Open bsutton opened 1 year ago
KeenWrite has a number of extensions that may serve as additional examples to those packaged with flexmark-java. In order from least to most complex, DocumentOutlineExtension.java
, r/RInlineExtension.java
and ImageLinkExtension.java
files may be worth looking over. The tex/TeXExtension.java
is a bit more involved and reasonably encapsulated.
We have a database that holds 'textblocks'. These are records in the db that hold small snippets of html or markdown.
I would like to add a new tag to the markdown parser/render.
Something of the likes of:
The precise syntax isn't critical.
My aim is to have the parser recognise this new tag and then during the render phase call out to my code so I can do a db lookup based on the page/block attributes and then return the HTML associated with the textblock. If the textblock contains markdown then I would do a recursive parse (but this I can deal with).
I've looked through the examples but they are all rather large and complex and in the readme it suggest that if the extension is more than 200 lines then I'm probably heading in the wrong direction which is why I'm here.
I need some suggestions as where to start from?