You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extensions.registerdopreprocessorTeXPreprocessorendclassTeXPreprocessor < Extensions::Preprocessordefprocessdocument,readerreturnreaderifreader.eof?reader.unshift_linesreader.read_lines# this is the culpritreaderendend
Adding reader.unshift_lines reader.read_lines breaks the conditional ifdef directives.
The text was updated successfully, but these errors were encountered:
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: ungive@b0a42dc
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.The text was updated successfully, but these errors were encountered: