Closed maciejmatczak closed 2 years ago
Also have this issue, did you ever find a way around it?
Also happens for regsub not good:
good:
In some other tmlanguage end match for regex is defined as: https://github.com/bradrobertson/sublime-packages/blob/22811a99485215062b7fe31990976c3b66b71a58/TCL/Tcl.tmLanguage#L114
In this plugin end match for regex is defined as: https://github.com/bitwisecook/vscode-tcl/blob/5148b946adc5b3a4e1b63978735f9060b13c462e/syntaxes/tcl.tmlanguage.yaml#L2902
I am not sure if there is not too many slashes there ;)
Is there a way to fix this locally? I want to use this plugin but can't change hundreds of lines of code to remove all of the nested evals.
Update: coworker is a wizard, this seems to work. It seemed to be matching any end bracket?
end: "(?=(?<!\\\\)(?:$|.*[\n;}\\]]))"
Oh nice! I'm going to be using TCL again in a few days, I'll try your modified regex and see how I get on with it.
thank you @ethantheb and your coworker, I'll merge this as it seems to fix your example for me @maciejmatczak
Release 0.4.1 has this fix and I've pushed it out to the extension marketplace.
Example:
Incorrectly formats as (dark+):
Seems to be correlated with regexp command itself and with nested evaluation in last argument. Also, when I delete last closing curly from if clause, the last section pick ups proper highlighting.