I'm working on a parser plugin to render Asciidoctor formated text.
The plugin is using Asciidoctor.js (
https://github.com/asciidoctor/asciidoctor.js) and basically works, but the content of the tiddler is the HTML code itself instead of the correctly rendered text. For example if I creating a new tiddler with the content
*bold* _italic_
then it's transforming to
<div class="paragraph"> <p><strong>bold</strong> <em>italic</em></p> </div>
As I looked in to the Markdown parser plugin, it seems that the Markdown.js returns a HTML tree (thanks to JsonML). I assume my plugin should do the same, but there is no option for this in Asciidoctor.js. How can I achieve this? Is there a builtin method to transform HTML nodes to HTML tree or should I use JsonML?
To try out:
* Run `bin/serve.sh editions/full`
* Press the second Markdown icon in the right panel (move the mouse over it, the tooltip should be related to Asciidoctor)
* Write `*bold* _italic_` in it and save the tiddler