Preserving file name and line number in Preprocessor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Preserving file name and line number in Preprocessor

Daniel K
Hi,

how can I use a preprocessor and preserving the file name and line number information? I tried different things:

- read all lines to a string list with readLines() and then add them again with restoreLines() --> file name and line number gets lost
- while(reader.hasMoreLines()) { reader.peekLine() } --> endless loop
- while(reader.hasMoreLines()) { reader.peekLine(); read.advance() } --> empty document since advance() seems to drop the line

The problem is that warnings and errors in the source files are not shown correctly anymore as soon as the preprocessor is registered.

Is there any chance to do that? I am using asciidoctorj 1.6.1.



Thanks!