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

Content added Content deleted
(Another problem with eating whitespace characters: Indentation of first line)
Line 191: Line 191:
In the source, all lines are indented with two spaces. In the resulting page, the indentation of the first line is gone.
In the source, all lines are indented with two spaces. In the resulting page, the indentation of the first line is gone.


IMHO whitespace characters should only be eaten up to and including the first newline. I guess currently there's a regexp like <tt><nowiki>[ \t\n]*</nowiki> for eating the initial whitespace. This should be changed to <tt><nowiki>[ \t]*\n</nowiki></tt>. --[[User:Ce|Ce]] 16:12, 26 January 2009 (UTC)
IMHO whitespace characters should only be eaten up to and including the first newline. I guess currently there's a regexp like <tt><nowiki>[ \t\n]*</nowiki></tt> for eating the initial whitespace. This should be changed to <tt><nowiki>[ \t]*\n</nowiki></tt>. --[[User:Ce|Ce]] 16:12, 26 January 2009 (UTC)