Village Pump:Home/Syntax Highlighting ( archived 2009-06-18 ): Difference between revisions

Can we have a fixed Tcl formatter? Please?
(Can we have a fixed Tcl formatter? Please?)
Line 207:
:: I've now found a trick to get Whitespace highlighting without any (visible) text around it: Use the Unicode character U+FEFF (ZERO WIDTH NO-BREAK SPACE) to mark the start/end of the code:
<lang whitespace>


</lang>
:: Note that U+FEFF renders as absolutely nothing, and is not whitespace as defined by Whitespace (although it ''is'' whitespace according to Unicode), and therefore should be ignored as "comment" by whitespace interpreters (I didn't test that, though). It apparently also isn't considered whitespace by the start/end line removing code, therefore it's not removed. --[[User:Ce|Ce]] 15:22, 26 January 2009 (UTC)
Line 305:
: Fixed, I think. Can someone verify that that code example actually compiles? I want to make sure I'm not adding stuff to the language file that isn't supported by the language. If it's good, I'll send the revised file upstream to be included with the next GeSHi release. --[[User:Short Circuit|Short Circuit]] 03:06, 3 April 2009 (UTC)
:: Yes, it works.
 
==Highlighting of Tcl==
Is it possible to change the highlighting of Tcl so that sequences where there is an open and close brace on the same line are not highlighted as (presumably) comments? This makes expressions and one-liners much more difficult to read than they otherwise would be. For example, this is a one line <tt>if</tt>:
<lang tcl>if {$a == [$b $c]} {puts [$d $a]} {error "$e $a"}</lang>
It's probably best for “{…}” to be not treated specially at all. (At some point we could also do with updating the list of ”keywords”, but that's nothing like as important.) —[[User:Dkf|Dkf]] 09:07, 22 May 2009 (UTC)
Anonymous user