asciidocasciidoctor

How can I pass processing square brackets with asciidoc?


Asciidoctor properly renders following line.

some text [address[title]]

When I add a hard break like this,

some text +
[address[title]]

the second line is not rendered at all.

How can I solve this?

update

So far, I found that one leading space does the job. I'm not sure this is a desired effect.

some text +
 [address[title]]

Solution

  • The problem is that [xxx] on a new line is the syntax to defined a role for the next bloc.

    When the Asciidoctor paser is confused, my solution is to define some variables on top of my document and to use them:

    :opening-bracket: [
    :closing-bracket: ]
    
    {opening-bracket}address{opening-bracket}title{closing-bracket}{closing-bracket}