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

(→‎Code tag change: Fixed color schemes.)
Line 147:
</code>
Not sure if that can be fixed or not. --[[User:Mwn3d|Mwn3d]] 18:58, 23 January 2009 (UTC)
 
: I guess it comes from the code removing those superfluous lines at the beginning and end (e.g. instead of the ugly
<pre>
<c>int main()
{
}</c>
</pre>
: you can write a more reasonable
<pre>
<code c>
int main()
{
}
</code>
</pre>
: without getting empty lines at the beginning/end.
: Note that in Whitespace, every non-whitespace character is a comment, so you can simply write any non-whitespace stuff at the beginning/end:
<code whitespace>
code:
end
</code>
: (note that this probably isn't a valid whitespace program; I just randomly added spaces/tabs).
: However, last friday, whitespace got nicely colored (tabs were bright red and spaces bright blue, IIRC). Now it's just white. Looking at the generated HTML, it seems classes "re2" (space) and "re3" (tab) are responsible for whitespace hilighting. Setting the background property for them should re-enable whitespace highlighting. --[[User:Ce|Ce]] 11:57, 26 January 2009 (UTC)
973

edits