Bug 450484 - Kate R syntax colorer puts extra underline on common operator
Summary: Kate R syntax colorer puts extra underline on common operator
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: 5.92.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-17 20:45 UTC by David
Modified: 2022-08-01 07:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2022-02-17 20:45:29 UTC
SUMMARY
If I open a .R file with Kate, it will show the operator ":=" with an extra underline in the right sign, making it show **three** bars instead of two. This is very annoying since it makes it harder to read the code and makes people think they've inputted the wrong symbol. These two symbols together (:=) are very common in R code, and what's more, kate's coloring backed is offered as one of the styles for "rmarkdown" (what most people use to write tutorials, manuals, vignettes, etc. with R code), but this issue makes it a very unsuitable candidate (and it's understandably not the default BTW, even though it otherwise looks better than the default style from rmarkdown). I have on multiple ocassions decided to use a Python syntax highlighter for R code instead due to this issue alone.

STEPS TO REPRODUCE
1. Save this text as a .R file and open it with Kate:
library(data.table)
dt <- data.table(col1 = 1:3)
dt[, col1 := col1+1]

OBSERVED RESULT
The ":=" operator has three lines.

EXPECTED RESULT
The ":=" operator should have two lines.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.0-2-amd64 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: AMD VEGA10
Comment 1 Waqar Ahmed 2022-02-22 19:26:06 UTC
Hi if you have some time maybe you can help us fix the bug. See the link below to learn more

https://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/
Comment 2 Bug Janitor Service 2022-07-31 22:59:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/327
Comment 3 Jonathan Poelen 2022-08-01 07:58:58 UTC
Git commit c94761c382ccf11483a1d116ec70c990e2f12e0b by Jonathan Poelen.
Committed on 31/07/2022 at 22:59.
Pushed by cullmann into branch 'master'.

R: add := operator

M  +2    -1    data/syntax/r.xml

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