Open ungive opened 3 years ago
This is a known limitation of a preprocessor and why I strongly discourage using it to manipulate any lines. Instead it should be treated only as an event. Manipulating lines can be done, but it must be done extremely carefully to avoid exactly these types of side effects. So it's a "caveat emptor" kind of extension point.
Extensions::Preprocessor
breaksifdef
directives. This was reported previously in #62.I made these changes: https://github.com/vonas/asciidoctor-extensions-lab/commit/b0a42dc7c09fe9412f2bc711a4d5dbb151df5ac7
I ran the following command with corresponding input and part of the output:
The gist of the extension code is this:
Adding
reader.unshift_lines reader.read_lines
breaks the conditionalifdef
directives.