[Plugin: Codecolorer] Be smart about stripping leading whitespace
-
Remove leading and trailing empty lines, without removing leading whitespace on the first actual line.
$ diff codecolorer.php.old codecolorer.php
220c220,221
< $text = trim($text);
—
> $text = preg_replace(‘/^( *\r?\n)+/’, ”, $text);
> $text = preg_replace(‘/\r?\n *$/’, ”, $text);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Codecolorer] Be smart about stripping leading whitespace’ is closed to new replies.