Skip to content

Commit

Permalink
RT #67517: Form feed appears to be white space
Browse files Browse the repository at this point in the history
Accept form feed as white space in Perl source (i.e. outside quotes),
and render it as "\f" in dumps.
  • Loading branch information
trwyant committed Apr 16, 2011
1 parent 7e7600d commit 1090dd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/PPI/Dumper.pm
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ sub _element_string {
my $content = $Element->content;
$content =~ s/\n/\\n/g;
$content =~ s/\t/\\t/g;
$content =~ s/\f/\\f/g;
$string .= " \t'$content'";
}

Expand Down
1 change: 1 addition & 0 deletions lib/PPI/Token/Whitespace.pm
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ BEGIN {
$CLASSMAP[ord '_'] = 'Word';
$CLASSMAP[9] = 'Whitespace'; # A horizontal tab
$CLASSMAP[10] = 'Whitespace'; # A newline
$CLASSMAP[12] = 'Whitespace'; # A form feed
$CLASSMAP[13] = 'Whitespace'; # A carriage return
$CLASSMAP[32] = 'Whitespace'; # A normal space

Expand Down

0 comments on commit 1090dd6

Please sign in to comment.