Closed tkfu closed 8 years ago
The behavior you are observing happens because the preprocessor reader only looks for preprocessor directives. It does not process attribute entries, or the document header.
I just submitted a fix in PR #63. With this change, the script now reads the document header to load all attribute entries defined there. It then passes all the attributes that are defined at the end of the header to the preprocessor reader. Let me know if that works for your use case.
I also documented what the script is doing better.
This is a very minor issue, since it's got such an easy workaround, but I'm reporting it anyway.
If I have a doc with conditional formatting based on ifdef::[], the script ignores the attributes set in the file. They have to be passed via the command line. I would expect the following file to give me the english version when passed through the script, but it just gives me blank output. If I do
ruby asciidoc-coalescer.rb -a en file.ad
, however, I get the correct output.