|
Given something like:
[bibliography]
- [[[prag]]] Andy Hunt & Dave Thomas. The Pragmatic Programmer:
From Journeyman to Master. Addison-Wesley. 1999.
When running a converter over it, the sequence of the AST traversal is pretty much List, ListItem, Bibref. Whereas this is good for most cases, for LEanpub this will cause an issue as it requires the anchor to be on a line of it's own i.e we need to generate something that is roughly like below
{#prag}
* Andy Hunt & Dave Thomas. The Pragmatic Programmer:
From Journeyman to Master. Addison-Wesley. 1999.
There is a good chance that the parent node did something the equivalent of '* ' + node.content.
My dilemma is how to solve this problem. I'm not sure whether Iit helps to traverse AST at this point to try to inject the necessary line above at that point.
Is there maybe a way of discovering that a list is a bibliography list, so that generation behaviour can be changed?
|