On Wed, 25 Mar 2020 at 11:16, Adriaan Rol <adriaan....@gmail.com> wrote:
>
> Hi Chris,
>
> Thanks for the quick reply. I know that simply changing the CSS does not work 
> and that I need to invoke either the reST thing (or the pygments directly). 
> My question is how do I invoke the reST thing from with in the plugin code.

Look at nikola/plugins/compile/rest/listing.py. You might be able to
re-use our CodeBlock class if you know how to invoke reST directives
manually, or you could just use pygments directly (with
pygments.highlight(code, lexer, formatter), consult that code for what
the three arguments are).

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

-- 
You received this message because you are subscribed to the Google Groups 
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nikola-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nikola-discuss/CAMw%2Bj7J5KVcVAPycE%3DesvWdF5LhfSwpkXs1%2BzMim-7k%2BqayivQ%40mail.gmail.com.

Reply via email to