Bug 449186 - Extglob patterns break Bash syntax highlighting
Summary: Extglob patterns break Bash syntax highlighting
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: 5.90.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-26 10:10 UTC by mixo
Modified: 2022-02-01 20:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mixo 2022-01-26 10:10:29 UTC
SUMMARY
Extglob patterns break the parsing. Everything following a string expansion with an extglob pattern is highlighted as "string" (in red) or "normal text" (in black). 

STEPS TO REPRODUCE
1. open a shell file
2. notice highlighting problems

OBSERVED RESULT
```
# in quotes
"${var#lo+(r)em}"
# everything that follows is treated as "string" (red)
```

and

```
# without quotes
${var#lo+(r)em}
# everything that follows is treated as "normal text" (black)
```

It happens with all extglob patterns: ?(...), *(...), +(...), @(...), !(...)

EXPECTED RESULT
The third line in both examples should be treated as a comment (light grey).

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Follow-up on bug #430668.