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

Line 98:
<lang php>
function prestyletrim($text) {
return preg_replace("/^&amp;nbsp;/","",preg_replace("/&amp;nbsp;$/,"",$text));
}
</lang>
Line 104:
::: Maybe if it works, the function should also be renamed.
::: BTW,. I now note that the extra empty line at the end does ''not'' appear on the PHP example, so adding the spurious &amp;nbsp; seems to be part of the programming language dependent code. --[[User:Ce|Ce]] 08:02, 12 October 2009 (UTC)
:::::The extra line didn't appear because the parser was in the middle of a literal string at the end of the example. I changed the text to what I think you might have meant to put and the blank line shows up. --[[User:Mwn3d|Mwn3d]] 12:11, 12 October 2009 (UTC)
 
=Java5 Highlighting=
Anonymous user