Re: [xsl] Highlight.js available as a XPath extension function

Subject: Re: [xsl] Highlight.js available as a XPath extension function
From: "Christophe Marchand cmarchand@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 3 Jul 2020 07:01:20 -0000
I didn't know Pygments, it seems great. At Oxiane, we've developed a slide editor that entirely runs in a browser, without any servide-side component. That's great to use, both for writing or for presenting. But, for our classes, we need a PDF version of slides, and we wanted a text-oriented PDF, where text can be copied and pasted. As code highlighting was done by highlightJS in editor tool (OS-slides !) - which is not yet open-sourced - I wanted to use exactly the same highlighter...

You complain about forking processes, but embedding a GraalJS engine in Java is not the best solution either... but I load only once GraalJS engine per Processor object ! We have to organize a highlighting-race for our tools !

See you,
Christophe

Le 03/07/2020 C 08:10, Norman Tovey-Walsh ndw@xxxxxxxxxx a C)critB :
Christophe Marchand cmarchand@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes:
Highlight JS is a well known javascript library that is able to
highlight source code in a HTML page.
Very nice, Christophe. I just recently finished coding up an extension
function to call the Pygments syntax highlighter. Ibll make that
available later this month.

Pygments does a very nice job, but it does mean running an external
process for every listing which isnbt the fastest way to get a job done.

                                         Be seeing you,
                                           norm

--
Norman Tovey-Walsh <ndw@xxxxxxxxxx>
https://nwalsh.com/

As long as a word remains unspoken, you are its master; once you utter
it, you are its slave.--Solomon Ibn Gabirol

Current Thread