Sublime Forum

ST3 Tcl syntax highlighting not working with regexp

#1

Hi,

in ST3 some regexp expressions in an Tcl script are not highlighted properly. For example:

set check1 [regexp {^’(.){0,32}’$} $param]
set check2 [regexp {[*?|"<>:/\]+} $param]

The problems are caused by the ’ and " signs. In ST2 everything works properly.

0 Likes

#2

Have you tried with the latest TCL syntax definition? I believe it has been updated since the last ST release

you can check the readme for how to update your TCL package from the repo: https://github.com/sublimehq/Packages/blob/master/README.md

0 Likes

#3

Generally the example you provided worked okay in the latest version, although the regexp string highlighting was termination after the first } in your first example. I’ve fixed in in the Packages repo.

If you run into any further errors, please open an issue so we can get it resolved.

0 Likes

#4

Indeed, the new Tcl package solves the problem in ST3. It’s weird though that the old Tcl package performed well under ST2 but not under ST3.
Thanks!

0 Likes

#5

Thanks for the fix. I will report any other issues.
Cheers
Alexandru

0 Likes

#6

Here is another bug in the syntax highlighting of regexp command:

regexp -inline -all {%[a-zA-Z_]*%} “whatever”

the -inline option appears in green (string) instead of white (option).

With:

regexp -all -inline {%[a-zA-Z_]*%} “whatever”

the -all option appears in green (string) instead of white (option).

0 Likes

#7

Could you report the issues at https://github.com/sublimehq/Packages/issues? it is an easier interface for me to keep track of todo items. Here on the forum it is easy to get lost.

0 Likes

#8

done, visit: https://github.com/sublimehq/Packages/issues/779

0 Likes