Re: Difficulty in consistently escaping __ markup

Posted by oddhack on
URL: https://discuss.asciidoctor.org/Difficulty-in-consistently-escaping-markup-tp5318p5328.html

I may not be following the first suggestion. When I try it on the following test case:

:__: __
:__kernel: __kernel

Non-attrib: __kernel blah __kernel

Underscore attrib: {__}kernel blah {__}kernel

Full Attrib: {__kernel} blah {__kernel}

What I see rendered is:

Non-attrib: kernel blah kernel

Underscore attrib: {}kernel blah {}kernel

Full Attrib: {kernel} blah {kernel}

The +__kernel+ passthrough does (in this example, anyway) seem to do the right thing,
though. Thanks!

Jon

mojavelinux wrote
I find the first solution to be the clearest. Here's how you might do it:

:__: __

{__}kernel

or

:__kernel: __kernel

{__kernel}

This works since attribute references are expanded after the quotes
substitution (i.e., text formatting) is applied.