Custom subsitutions in delimited blocks

Posted by xcoulon on
URL: https://discuss.asciidoctor.org/Custom-subsitutions-in-delimited-blocks-tp8268.html

Hello,

I have the following document with an example block:
:github-url: https://github.com
			
[subs="quotes"]
====
a link to https://example.com[] <1>
and <more text> on the +
*next* lines with a link to {github-url}[]
====

and with Asciidoctor 2.0.10, I get the following output:

<div class="exampleblock">
<div class="content">
<div class="paragraph">
<p>a link to <a href="https://example.com" class="bare">https://example.com</a> &lt;1&gt;
and &lt;more text&gt; on the<br>
<strong>next</strong> lines with a link to <a href="https://github.com" class="bare">https://github.com</a></p>
</div>
</div>
</div>


however, I did not expect that the other substitutions (attributes, macros, specialchars, post_replacements) would also be executed.
My understanding is that with `subs="quotes"`, only the "quotes" substitution would be executed, since I'm not prepending or appending an extra substitution here. Also, the same substitution works as expected if the delimited block is a "listing" block, or if it's a paragraph.

Am I missing something, or is there a different treatment of substitutions for normal content blocks (example, quotes, sidebar) vs verbatim content blocks (fenced, listing, etc.) ?


Best regards,