It detects \def as command, but it doesn’t \DesiredFont as a command.
In ConTeXt, command pattern matching for highlighting is a backslash followed by any letter ([A-Za-z]), plus any of the characters @!?_ or a character from the last three lines in the code bellow.
Since I cannot code, I adapted the lines above from the ConTeXt source with the explanation Parsing Expression Grammars For Lua. Sorry, but I’m afraid this is the clearest way I can describe it.
Would it be possible to have a similar approach in skylighting for this particular case?
@jgm, as suggested by you, this comes from jgm/pandoc#4466.
For some strange reason, latest
pandoc
parses:into
It detects
\def
as command, but it doesn’t\DesiredFont
as a command.In ConTeXt, command pattern matching for highlighting is a backslash followed by any letter (
[A-Za-z]
), plus any of the characters@!?_
or a character from the last three lines in the code bellow.To avoid
\n
highlighted as a command, the following line is introduced:Since I cannot code, I adapted the lines above from the ConTeXt source with the explanation Parsing Expression Grammars For Lua. Sorry, but I’m afraid this is the clearest way I can describe it.
Would it be possible to have a similar approach in skylighting for this particular case?
Many thanks for your help.