An option to provide additional features while not overloading the main application would be to allow for pre- or post-processors, similar to how mdBook does.
A way to realize that would be to pipe the ASTs ("abstract syntax trees") of all involved documents to external programs via JSON, let them modify these representations, and pipe them back.
Examples for add-on features that could use this possibility:
Use BibTex for reference management (see issue #3).
Below each code block, provide a list of links to referenced code blocks. Equip references code blocks with HTML jump anchors.
Data exchange
A decision must be made in which state to transfer documents:
Raw markdown text before transclusions
Pros:
processor can add transclusions
Cons:
processor must anticipate changes by later transclusion
Raw markdown text after transclusions
Pros:
more easy for the preprocessor to create additional documents (comp. to 3.)
Cons:
processor may have to parse the document similar to Yarner
Parsed Document before code extraction
Pros:
easy to analyze document
Cons:
harder for the preprocessor to create additional documents (comp. to 2.)
a lot of data (potentially uninteresting for the processor) must be tranfered forth and back to allow for the addition of documents
For a trial with version 3.) (parsed document), see #125 for the implementation, and yarner-block-links and yarner-fold-code an example pre-processors.
An option to provide additional features while not overloading the main application would be to allow for pre- or post-processors, similar to how mdBook does.
A way to realize that would be to pipe the ASTs ("abstract syntax trees") of all involved documents to external programs via JSON, let them modify these representations, and pipe them back.
Examples for add-on features that could use this possibility:
Data exchange
A decision must be made in which state to transfer documents:
Document
before code extraction