jgm / skylighting

A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions
189 stars 61 forks source link

[raku] Operator highlighting in word quote #155

Open habere-et-dispertire opened 1 year ago

habere-et-dispertire commented 1 year ago

Syntax highlighting appears confused by the word quote construct < >.

The following example illustrates the issue:

# x, xx, o, X, Z are not used here as operators
# but are highlighted as such inside the word
# quote construct < >

my @array = [ 'x', 'xx', 'xxx', 'o', 'oo', 'X', 'Y', 'Z' ];
my @array = <  x    xx    xxx    o    oo    X    Y    Z  >;

It looks okay using GitHub's syntax highlighting -- see attached PDF:

X-syntax-issue-min.pdf

Please let me know if I can be of help. :-)

jgm commented 1 year ago

First step is to determine whether this is a bug in the KDE syntax definition or in pandoc's implementation of it. Easiest way to do that is to see if the issue can be reproduced in the Kate editor.

habere-et-dispertire commented 1 year ago

I can replicate it on Kate 22.08.1 on Windows, screenshot:

kate-22-08-1-min

jgm commented 1 year ago

In that case you should report the bug upstream to KDE at https://invent.kde.org/~/issues . Once it is fixed upstream, we can merge the fixed version here.

habere-et-dispertire commented 1 year ago

Filed issue 460347 with Kate editor. :-)

jubilatious1 commented 11 months ago

It looks okay using GitHub's syntax highlighting -- see attached PDF:

X-syntax-issue-min.pdf

Not here. PDF with GitHub's syntax highlighting shows bold for words that are recognized as operators (e.g. x and xx; MacOS 13.4 Ventura PDF conversion).