Re: Events in the Java integration?

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Events-in-the-Java-integration-tp1190p1195.html

Great response Alex.

As for the events in Asciidoctor core, the short answer is that I just haven't had time to add them in yet. We definitely want to provide the most sensible hook to customize the processor for built-in blocks.

Currently, the only extension points during parsing are for:

- blocks with a custom style
- custom block macros
- custom inline macros

If you want to help design the extension point / mechanism for built-in blocks (e.g., sidebar, example, open, paragraph, etc), we absolutely welcome your input. You can post here or in the issue tracker.

The only constraint is that we want to ensure we don't slow down parsing in the default setup.

Cheers,

-Dan

On Dec 8, 2013 11:01 AM, "asotobu [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
For now there is no events, as Dan suggested we should study to see if we add this support or not. But the good news are two:

The fist one is that Marek has implemented for version 1.5.0 a way to retrieve AsciiDoc document in a structured way: https://github.com/asciidoctor/asciidoctorj/pull/104 

Of course he has implemented for his requirements but of course if you found that something is missing, feel free to implement or of course opening an issue and I will try to implement as soon as possible.

The other good news is that a Block method as you suggested contains few methods, but is is so easy to add new ones, because in fact it is a proxied interface to Block Ruby object  (https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/block.rb) so again feel free to open issues to add support on them.

Alex.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Events-in-the-Java-integration-tp1190p1194.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML