Re: Another markup-escaping question

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Another-markup-escaping-question-tp5665p5672.html

Open block is the one exception to this rule. That's why we have this issue:

https://github.com/asciidoctor/asciidoctor/issues/1121

The choice to use two hyphens for an open block in AsciiDoc (Python) was a mistake. It broke the model of AsciiDoc in more than one way. That's why I plan on addressing it. It's probably going to be part of the 1.5.7 release.

You can escape the hyphens in the listing block using either an attribute reference or a character reference.

For example:

:open-block-delimiter: --
--
[subs=attributes+]
----
{open-block-delimiter}
----
--

or

--
[subs=+replacements]
----
--
----

I prefer the first solution.

Cheers,

-Dan

On Mon, Jun 19, 2017 at 2:36 AM, oddhack [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ah, I see the problem now - missed one level of block quoting, so the real scenario was more like

[open]
--
[source,asciidoc]
----
[open]
--
Lorem ipsum.

include::lorem.ipsum[]
----
--

I can work around this by using three dashes on the outer (actual) open block to avoid misinterpretation of the two dashes on the inner (code highlighter-rendered) two dashes, but is there truly no way to escape the inner two dashes so they don't cause this problem to begin with?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Another-markup-escaping-question-tp5665p5670.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux