Hi Dag, I would say its simply a side effect of the way asciidoc works. Comments are just macros, so they are recognised by regular expressions, but the regex does not include the newlines because $ matches just *before* the newline, so they are not part of the comment and get copied verbatim into the output. This means the regex does not need to account for all the line end combinations on various platforms.
Cheers Lex On 20 February 2015 at 02:34, Dag Wieers <[email protected]> wrote: > Hi, > > Something I have been wondering myself in the past is why do comment lines > cause additional newlines where you wouldn't expect them ? > > Comment Blocks do not show this behaviour (they do not result in any > newlines). > > This example (3 commented lines): > > -------- > - Item 1 > // - Irrelevant stuff > // - Commented out > // Just because I can > - Item 2 > -------- > > results in (only) 2 empty newlines: > > -------- > <div class="ulist"><ul> > <li> > <p> > Item 1 > > > </p> > </li> > <li> > <p> > Item 2 > </p> > </li> > </ul></div> > -------- > > Is this on purpose ? > > -- > Dag -- 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 http://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
