|
From: Raymond T. <toy...@gm...> - 2025-07-10 15:07:25
|
On 7/8/25 12:32 PM, Stavros Macrakis wrote: > That just looks like a bug. Surely the syntactic highlighter is only > supposed to operate on text tagged as code. > It can't possibly work on free text, since a lot of Maxima keywords > and function names are common English words. The current implementation just looks for an html class of |.example-preformatted| because currently all |@example| blocks are emitted with that class. Newer versions of texinfo support doing |@example style| where |style| can by things like |lisp|, |c|, or whatever, including |maxima|. I forget what is produced in the html but we could modify the highlighter to only look for the appropriate class. This would be a lot of work, but at least it can be done incrementally so that only examples that are pure Maxima will be highlighted. However, this is also a bit more complicated because many of the examples can be generated via a script. The script would need to be updated. But I think that no matter what, highlightjs will make mistakes. It's just a bunch of regexes for matching, IIUC. ​ |