зеркало из https://github.com/mozilla/pjs.git
Add an "emptyLines" filter to the preprocessor that strips empty lines from the output. r=Hixie (not part of the build)
This commit is contained in:
Родитель
a281cdd885
Коммит
e0e8da35c4
|
@ -447,6 +447,12 @@ sub unfilter {
|
|||
|
||||
package filter;
|
||||
|
||||
sub emptyLines {
|
||||
my($stack, $text) = @_;
|
||||
$text = "" if $text eq "\n";
|
||||
return $text;
|
||||
}
|
||||
|
||||
sub spaces {
|
||||
my($stack, $text) = @_;
|
||||
$text =~ s/ +/ /gos; # middle spaces
|
||||
|
|
|
@ -177,6 +177,9 @@ Filters
|
|||
|
||||
The following filters are supported:
|
||||
|
||||
emptyLines
|
||||
Strips blank lines from the output.
|
||||
|
||||
slashslash
|
||||
Strips everything from the first two consecutive slash (/)
|
||||
characters until the end of the line.
|
||||
|
|
Загрузка…
Ссылка в новой задаче