Created attachment 109381 [details] The script. Version 16.08.2 KDE Frameworks 5.26.0 Qt 5.6.1 Opensuse 42.2.20170721 I've written a bash script to convert .sub to .vtt Subtitle files. The script works perfectly. This line screws up highlighting [[ $line_name =~ \{([0-9]{1,})\}\{([0-9]{1,})\}(.*) ]] From here down, Highlighting is broken. This line reads "{123}{128}Some Subtitle text." it's the \{ \} escapes that mess it up. Also, I've noticed that it doesn't correctly highlight a line like this. [[ $name =~ (.*)_(S[0-9]{2})(E[0-9]{2,3}[a-z]{0,1})_(.*) ]] All good until {2} then all blue to the )_( near the end. This does not break highlighting in the rest of the file. I'm new to this, So be kind ;) Jim
Git commit b8a7413fc560e254cda2c7c0903b157c71b9f836 by Nibaldo González. Committed on 10/09/2018 at 08:10. Pushed by ngonzalez into branch 'master'. Bash: fix parameter & brace expansion Summary: Sometimes, the content in braces `{ ... }` is not correctly highlighted, since the RegExpr rule that detects it is very general. {F6246660} Also, some parameter expressions are added, such as `${parameter^^pattern}`, `${parameter,,pattern}` & `${parameter@operator}` (before, that was highlighted as "Error"). In the expressions `${parameter:offset:length}`, spaces are allowed after ":" and +/- signs in numbers. **Source:** * Bash Reference Manual: https://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion Reviewers: cullmann, dhaumann, #framework_syntax_highlighting Reviewed By: cullmann, dhaumann, #framework_syntax_highlighting Subscribers: kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D15390 M +11 -0 autotests/folding/test.bash.fold M +11 -0 autotests/html/test.bash.html M +11 -0 autotests/input/test.bash M +11 -0 autotests/reference/test.bash.ref M +21 -6 data/syntax/bash.xml https://commits.kde.org/syntax-highlighting/b8a7413fc560e254cda2c7c0903b157c71b9f836