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>

when I save the tiddler. (screenshot: https://i.imgur.com/aHtHneJ.png)

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:

* Clone https://github.com/bimlas/tiddlyWiki5/ and check out 
`asciidoctor-plugin` branch, or simply download 
https://github.com/bimlas/TiddlyWiki5/archive/asciidoctor-plugin.zip
* 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

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/e223b36a-353e-43c2-aaef-72b72de34d92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to