Le 29/10/2022 à 11:06, Werner LEMBERG a écrit :
Please have a look at the attached image, taken from the LM section 3.4.1. As can be seen, the second variable ('cello') is bold, while the first one ('violin') isn't. Can this be fixed?
~/repos/lilypond $ cat test.ly violin = #'foo cello = #'foo ~/repos/lilypond $ pygmentize -f raw test.ly Token.Name.Builtin.Clef 'violin' Token.Whitespace ' ' Token.Punctuation '=' Token.Whitespace ' ' Token.Punctuation '#' Token.Literal.String.Symbol "'foo" Token.Whitespace '\n' Token.Name.Lvalue 'cello' Token.Whitespace ' ' Token.Punctuation '=' Token.Whitespace ' ' Token.Punctuation '#' Token.Literal.String.Symbol "'foo" Token.Whitespace '\n' The problem is that "violin" is also the name of a clef: \clef violin . Maybe it's possible to fix this particular case, but in general the Pygments lexer would have to be far smarter in order to distinguish cases where a particular word is used as a user-defined name vs. those where it should be highlighted as a builtin.