Login  Register

Re: Interpret links (or other AsciiDoc syntax) only in specific lines of a [source] block

Posted by mojavelinux on Feb 18, 2021; 7:55am
URL: https://discuss.asciidoctor.org/Interpret-links-or-other-AsciiDoc-syntax-only-in-specific-lines-of-a-source-block-tp8499p8510.html

> If I'm reading the thing correctly, the `highlight` method is where most of the magic happens, and the idea would be to use this to override/extend the source -> lexer -> formatter(s) chain.

You've got it!

-Dan

On Tue, Feb 16, 2021 at 7:57 AM Oblomov [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello Dan,

I see, a posteriori it makes sense that hooking directly into the syntax highlighter would be the appropriate thing to do.
If I'm reading the thing correctly, the `highlight` method is where most of the magic happens, and the idea would be to use this to override/extend the source -> lexer -> formatter(s) chain.

I'll study this thing a bit to see which part of the chain would be more useful to hijack / override / extend.

Thanks a lot,

GB


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Interpret-links-or-other-AsciiDoc-syntax-only-in-specific-lines-of-a-source-block-tp8499p8505.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux