Rosetta Code:Village Pump/Syntax highlighting: Difference between revisions

Line 19:
I just wanted to make sure that this problem doesn't get forgotten now that the thread moved to the archive page. --[[User:Ce|Ce]] 23:18, 6 July 2009 (UTC)
: I think you're going to have to reiterate exactly what the problem is, and how it manifests itself under the current configuration. --[[User:Short Circuit|Short Circuit]] 23:50, 6 July 2009 (UTC)
:: In
<pre><nowiki>
<lang cpp>
int main {}
</lang>
</nowiki></pre>
:: there are additional blank lines,
<lang cpp>
int main {}
</lang>
:: which don't appear in
<pre><nowiki>
<pre>
int main()
&lt;/pre>
</nowiki></pre>
:: which results in
<pre>
int main()
</pre>
:: Those lines shouldn't be there. Currently the only way to get rid of them is to put the beginning/end tag on the same line as the first/last line of the code, which makes editing (and especially modifying existing snippets) unnecessarily hard (especially it's ''easy'' to miss an end tag, since it's bolted onto the last line of the code). In addition, it's an inconsistency. The lang tags should work exactly like pre tags, except for syntax hilighting.
:: The old discussion is in [[Village Pump:Home/Syntax Highlighting ( archived 2009-06-18 )#Another problem with eating whitespace characters]] (note that the start of that discussion concerns an older state with a different problem; initially too much was removed). --[[User:Ce|Ce]] 10:42, 7 July 2009 (UTC)
 
=Language tags=
973

edits