Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unbust Pod table handling with Windows newlines.
/^^\s*$$/ can end up matching in the middle of \r\n. While this does
want looking into, in this case we already have lines so it's easy to
work around.
  • Loading branch information
jnthn committed Oct 3, 2014
1 parent 041c89a commit da3aae7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Pod.nqp
Expand Up @@ -249,8 +249,8 @@ class Perl6::Pod {
# from every row, also remove trailing \n
my $w := -1; # the longest leading whitespace
for @rows -> $row {
next if $row ~~ /^^\s*$$/;
my $match := $row ~~ /^^\s+/;
next if $row ~~ /^\s*$/;
my $match := $row ~~ /^\s+/;
next unless $match;
my $n := $match.to;
if $n < $w || $w == -1 {
Expand All @@ -259,7 +259,7 @@ class Perl6::Pod {
}
my $i := 0;
while $i < +@rows {
unless @rows[$i] ~~ /^^\s*$$/ {
unless @rows[$i] ~~ /^\s*$/ {
if $w != -1 {
@rows[$i] := nqp::substr(@rows[$i], $w);
}
Expand Down

0 comments on commit da3aae7

Please sign in to comment.