Bug 460347 - [raku] Operator highlighting in word quote
Summary: [raku] Operator highlighting in word quote
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 09:29 UTC by habere-et-dispertire
Modified: 2023-08-03 06:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Kate editor on Windows showing raku syntax highlighting issue (3.55 KB, image/png)
2022-10-13 09:29 UTC, habere-et-dispertire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description habere-et-dispertire 2022-10-13 09:29:57 UTC
Created attachment 152764 [details]
Kate editor on Windows showing raku syntax highlighting issue

Syntax highlighting appears confused by the [word quote](https://docs.raku.org/language/quoting#index-entry-%3C_%3E_word_quote) construct `< >`.

The following example illustrates the issue:

~~~raku
# 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  >;
~~~

This issue is observed on Windows with Kate 22.08.1 and on macOS via nix and pandoc.

See Github issue:
https://github.com/jgm/skylighting/issues/155
Comment 1 Christoph Cullmann 2022-10-29 18:11:29 UTC
Thanks for the report, some patch would be welcome

https://invent.kde.org/frameworks/syntax-highlighting#how-to-contribute
Comment 2 Bug Janitor Service 2023-08-03 00:32:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/520
Comment 3 Christoph Cullmann 2023-08-03 06:21:02 UTC
Git commit 93cbc83a0d2c93212232b0cbd7d87fff76c11455 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 03/08/2023 at 08:20.
Pushed by cullmann into branch 'master'.

Raku: fix quote-words and more

Operator handling has been reviewed to determine if \< is an operator or a term

```pl
$i < 1
$i + < 1
     ^ string delimiter
```

- fix `\cNNNN`
- fix range operator in a regex
- fix some pattern in regex
- fix adverb argument
- ....

New highlighting:

- Symbol
- Hyper Operator
- Member Operator
- Number Suffix
- Pattern Bracket
- Pattern Delimiter
- Pattern Named Capture

M  +109  -36   autotests/folding/highlight.raku.fold
M  +19   -19   autotests/folding/test.markdown.fold
M  +442  -369  autotests/html/highlight.raku.dark.html
M  +442  -369  autotests/html/highlight.raku.html
M  +20   -20   autotests/html/test.markdown.dark.html
M  +20   -20   autotests/html/test.markdown.html
M  +73   -0    autotests/input/highlight.raku
M  +402  -329  autotests/reference/highlight.raku.ref
M  +20   -20   autotests/reference/test.markdown.ref
M  +2    -2    data/syntax/markdown.xml
M  +846  -532  data/syntax/raku.xml

https://invent.kde.org/frameworks/syntax-highlighting/-/commit/93cbc83a0d2c93212232b0cbd7d87fff76c11455