Bug 444506 - Syntax highlighting on nested parentheses is incorrect
Summary: Syntax highlighting on nested parentheses is incorrect
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-27 19:40 UTC by Gusted
Modified: 2022-01-28 21:12 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gusted 2021-10-27 19:40:23 UTC
SUMMARY

The syntax highlighting is incorrect when nested parentheses are present.

STEPS TO REPRODUCE
1. Open up a file that has the `.html` extension type.
2. Paste the following content into the text editor:
```
<!DOCTYPE html>
<html>
  <head>
    <style>
        body {
            background-color: hsl(0, 0%, calc(95% - 3%)) !important;
        }
    </style>
  </head>
  <body>
  </body>
</html>
```
3. Ensure that you have HTML syntax highlighting.

OBSERVED RESULT
`hsl(` is colored purple(breeze dark color scheme). 
The first next following parentheses `3%))` is colored.
                                        ^
EXPECTED RESULT
`hsl(` is colored purple(breeze dark color scheme). 
The correct next following corresponding parentheses `3%))` should be colored.
                                                         ^
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.14-arch1-1
(available in About System)
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Comment 1 Bug Janitor Service 2022-01-26 00:35:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/297
Comment 2 Christoph Cullmann 2022-01-28 21:12:01 UTC
Git commit ca5065ae1a65ef44784b902e54312e57b3010bc7 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 28/01/2022 at 21:04.
Pushed by cullmann into branch 'master'.

CSS: fix nested function call

M  +1    -0    autotests/folding/highlight.css.fold
M  +1    -0    autotests/html/highlight.css.dark.html
M  +1    -0    autotests/html/highlight.css.html
M  +1    -0    autotests/input/highlight.css
M  +1    -0    autotests/reference/highlight.css.ref
M  +2    -1    data/syntax/css.xml

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