Unfortunately if the delimiter is legal within the delimited text there is always going to be a risk of clashes.
The Asciidoctor implementation therefore requires that the closing and opening delimiters be the same length. This allows you to choose a length that doesn't clash with the contents. It would be good if someone made a patch that made that an option on Asciidoc Python as well. But at the moment the only option is as you found, make the contents of the code not match the delimiter by adding something to the line, either the spaces at the start that you used or a comment at the end. You could also try an invisible Unicode code point like zero width space U+200B if it doesn't break your highlighter. Cheers Lex On 22 September 2016 at 22:12, Stéphane Thomas <[email protected]> wrote: > Hi, > > Let's say I have the following code : > > [source,shell,numbered] > ---- > some source > code > yeah! > ---- > > If my source code contains a line with only dashes (at least four) it will > prematurelly close my source block, this is not what I want… > > I found the two following solutions : > > 1) Use an open block : > > [source,shell,numbered] > -- > some source > -------- > ^^^ the above line won't close the block > code > yeah! > -- > > Then, only a line with exactly two dashes would prematurelly close the > block. This is still problematic because I may encounter such files. > > 2) Add four spaces in front of all lines of the source : > > [source,shell,numbered] > ---- > some source > code > --------------- > ^^^ line of dashes, no problem > yeah! > ---- > > This is better as it would allow me to have lines of dashes (of any length) > in my source but those four spaces will be presents in the rendered > document… > > Do you have any advice ? > > Stef > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/asciidoc. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
