Skip to content

Commit

Permalink
save work
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Oct 20, 2017
1 parent e5879c6 commit 5eb299f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Perl6/Pod.nqp
Expand Up @@ -339,7 +339,7 @@ class Perl6::Pod {
my $m := $v ~~ /
:ratchet
([<!before [\h+ || ^^] '|' [\h+ || $$]> .]*)+
% [ [\h+ || ^^] '|' [\h+ || $$] ]
% [ [\h+ || ^^] '|' [\h || $$] ]
/;
@res[$i] := [];
for $m[0] { @res[$i].push(normalize_text($_)) }
Expand All @@ -352,7 +352,7 @@ class Perl6::Pod {
@res[$i] := [];
for $m[0] { @res[$i].push(normalize_text($_)) }
} else {
# now way to easily split rows with visual separators
# now way to easily split rows with non-visual separators
return splitrows(@rows);
}
$i := $i + 1;
Expand Down Expand Up @@ -467,7 +467,7 @@ class Perl6::Pod {
# collect cell delimiters per row
my $i := 0;
while $i < +@rows {
unless @rows[$i] ~~ /^'='+ || ^'-'+ || ^'_'+ || ^\h*$ / {
unless @rows[$i] ~~ $is_table_row_sep {
my @line := nqp::split('', @rows[$i]);
my $j := 0;
while $j < +@line {
Expand All @@ -476,10 +476,10 @@ class Perl6::Pod {
@suspects[$j] := 1;
}
}
$j := $j + 1;
++$j;
}
}
$i := $i + 1;
++$i;
}

# now let's skip the single spaces by marking them impossible
Expand All @@ -490,7 +490,7 @@ class Perl6::Pod {
@suspects[$i] := 1;
}
}
$i := $i + 1;
++$i;
}

# now we're doing some magic which will
Expand All @@ -511,13 +511,13 @@ class Perl6::Pod {
@ranges.push($i);
$wasone := 0;
}
$i := $i + 1;
++$i;
}
@ranges.push(0); # guard

my @ret := [];
for @rows -> $row {
if $row ~~ /^'='+ || ^'-'+ || ^'_'+ || ^\h*$/ {
if $row ~~ $is_table_row_sep {
@ret.push($row);
next;
}
Expand Down

0 comments on commit 5eb299f

Please sign in to comment.