Hello!
When working with tcl-files in SciTE, I noticed that strings like
$("bla") which is a jquery call in a tcl file result in incorrect detection of the quote's boundaries. The lexer thinks the quote starts at the second ", and thus never terminates.
Here's a litte patch that allows the usage of $("abc") jquery selectors in tcl code.
Committed as [a11a03].
Also re-indented the file since it had become messy as [b38366] so please use the current version for any new patches.
Related
Commit: [a11a03]
Commit: [b38366]
Thanks for the commit. There is still one minor issue with my patch. ( and ) within quotes is not formatted correctly. The first ( within a quote is highlighted, but the second is not.
I don't have a perfect understanding of the TCl lexer code and apologize for this oversight.
I suppose the following would fix it:
--- a/lexers/LexTCL.cxx Sat Mar 21 09:16:35 2015 +1100
+++ b/lexers/LexTCL.cxx Wed Mar 25 11:18:58 2015 +0100
@@ -257,7 +257,7 @@
sc.ForwardSetState(SCE_TCL_DEFAULT);
visibleChars = true; // necessary if a " is the first and only character on a line
goto next;
sc.SetState(SCE_TCL_OPERATOR);
expected = sc.ch == '[';
sc.ForwardSetState(SCE_TCL_IN_QUOTE);
An example would help.
try something like
" (abc) "
and you'll notice only the first bracket is highlighted.
A full example with context. I'm trying to work out what your original problem really was since I can't see why there is jquery inside TCL.
The jquery strings are for web pages generated by OpenACS (openacs.org), where you can generate web pages dynamically using tcl code. The issue with jquery is fixed now, but there is some issue with brackets inside strings, which just pops up if you startup scite, switch to tcl mode and enter a string like the one I pasted above. I hope this clarifies the issue.
The closing bracket is caused by the patch. Unless there is an example showing why the patch is needed then it should be backed out.
or you could commit the one-liner above to fix the closing bracket
Are you really refusing to show the problem code?
Change set [ea7867] reverts [a11a03] to fix regression.
As there is no evidence for the originally reported problem, reclassifying as rejected.
Related
Commit: [a11a03]
Commit: [ea7867]