Try this this with bash highlighting if [[ ! ("${argument}" =~ ^[1-9]+[0-9]*$) ]] ; then # This comment is not (all) grey. Removing this ' apostrophe helps next line echo this line is all red, and next too # The ; after ]] in first line is red # Removing ~ from =~ in first line helps with too much red # but the regexp is then all thin/black KDE Frameworks Version: 5.91.0 Some years ago all was fine can't say when it starts PS Sorry, can't find syntax component as bug addressee
Just a hint: Bash highlighting has a lot more issues. Using Zsh instead looks much better but not with this code snipped. Perhaps one should just start with the Zsh as blueprint to fix it
i, another example ~~~ esee=foo.bar echo "${esee%%.*}" echo "this text should be red instead white, remove the last \" after } turn red this text except the escaped charater" ~~~
@Gustavo Alvarez: your other example is for another bug (#451363 which is fixed)
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/303
Git commit fcd703aefdcdaad88b9a82deee0878f5effd025b by Jonathan Poelen. Committed on 20/03/2022 at 02:02. Pushed by cullmann into branch 'master'. Bash/Zsh: fix expression closing parenthesis in regex M +4 -0 autotests/folding/highlight.sh.fold M +6 -0 autotests/folding/test.zsh.fold M +4 -0 autotests/html/highlight.sh.dark.html M +4 -0 autotests/html/highlight.sh.html M +6 -0 autotests/html/test.zsh.dark.html M +6 -0 autotests/html/test.zsh.html M +4 -0 autotests/input/highlight.sh M +6 -0 autotests/input/test.zsh M +4 -0 autotests/reference/highlight.sh.ref M +6 -0 autotests/reference/test.zsh.ref M +2 -2 data/syntax/bash.xml M +4 -4 data/syntax/zsh.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/fcd703aefdcdaad88b9a82deee0878f5effd025b
Thank you Jonathan, this looks good now :-)