Created attachment 123586 [details] Bash highlighting example Strings within braces will cause problems if there is a space. xxx${"{"}xxxxxx${"}"}xxx # This works xxx${"{"}xxx xxx${"}"}xxx # Highlighting error OBSERVED RESULT String highlighting will continue, overriding other styles. SOFTWARE/OS VERSIONS KDE neon: 5.17 KDE Plasma Version: 5.17.1 KDE Frameworks Version: 5.63.0 Qt Version: 5.13.1 ADDITIONAL INFORMATION See attachment
After messing around for a bit I discovered that commenting out this line: <RegExpr attribute="Escape" context="BraceExpansion" String="\{(?=(\\[ \{\}]|[^\s\{\}]|\{(\\[ ]|\S)*\})+\})" fixes this issue. That line comes from a patch which fixes https://bugs.kde.org/show_bug.cgi?id=387915
(In reply to Anders Ponga from comment #1) > After messing around for a bit I discovered that commenting out this line: > > <RegExpr attribute="Escape" context="BraceExpansion" String="\{(?=(\\[ > \{\}]|[^\s\{\}]|\{(\\[ ]|\S)*\})+\})" > > fixes this issue. > That line comes from a patch which fixes > https://bugs.kde.org/show_bug.cgi?id=387915 After checking I confirmed that this bug is present before that patch.
(In reply to Anders Ponga from comment #2) > (In reply to Anders Ponga from comment #1) > > After messing around for a bit I discovered that commenting out this line: > > > > <RegExpr attribute="Escape" context="BraceExpansion" String="\{(?=(\\[ > > \{\}]|[^\s\{\}]|\{(\\[ ]|\S)*\})+\})" > > > > fixes this issue. > > That line comes from a patch which fixes > > https://bugs.kde.org/show_bug.cgi?id=387915 > > After checking I confirmed that this bug is present before that patch. Disregard my nonsense. I have no idea what's going on.
I have tried to fix this, but I need more knowledge in Bash, since there is no simple solution, we must change the way it stands out in content within the braces ${...}. I have also seen that this bug is present in more text editors such as Atom, Visual Studio Code and Sublime Text.
Is the syntax ${"..."} really valid? I don't see anything like it in the manual.
Created attachment 130659 [details] Not sure if this is related but an example of a bad highlighting in kate just in case. May help you narrow down the problem.
Created attachment 130660 [details] Another example
I'm closing this issue because the syntax indicated by the author is not valid in bash or ksh and he doesn't give more context. The images added by Miklos correspond to a real bug, but it has nothing to do with this bug and there has already been a fix several years ago.