Events in the Java integration?
Posted by
vmassol on
URL: https://discuss.asciidoctor.org/Events-in-the-Java-integration-tp1190.html
Hi guys,
I'm trying to use AsciiDoctor to implement support for AsciiDoc in XWiki Rendering (
http://rendering.xwiki.org). I'm using version 0.1.4 and I was hoping I coud get Events in there but I cannot find them. The best I could fine was TreeProcessor but it doesn't really work:
* It's called after the AST has been created which is too late for my need since I need a streaming parser that can scale to any input size and thus the full AST shouldn't be stored in memory
* I implement a TreeProcessor and I can get a List<Block> using document.blocks(). However the Block interface only has a lines() method to get the content and it seems to be the raw unparsed content (for ex for an input of "this is *bold*", block.lines() will return that string unparsed).
Maybe I missed something and there's a way to get the different kind of Blocks (Paragraph, Word, Bold, List, etc)?
Thank you!
-Vincent
PS: I got a tweet from Dan that prompted me to try 0.1.4: "@vmassol @dobermai @alexsotob @glaforge Events are coming in 0.1.4 release & more in the one ~ Devoxx. It's use of JRuby is not a negative.". Source:
https://twitter.com/mojavelinux/status/376809428650971136