summaryrefslogtreecommitdiff
path: root/i18n-diff-auditor
diff options
context:
space:
mode:
Diffstat (limited to 'i18n-diff-auditor')
-rwxr-xr-xi18n-diff-auditor4
1 files changed, 3 insertions, 1 deletions
diff --git a/i18n-diff-auditor b/i18n-diff-auditor
index 853dcce..e8914c0 100755
--- a/i18n-diff-auditor
+++ b/i18n-diff-auditor
@@ -160,9 +160,10 @@ sub semiparse ($) {
die "cannot tokenise \`$&'";
}
}
- for (my $i=@o-2; $i>0; --$i) {
+ for (my $i=0; $i+2 < @o; $i++) {
next unless $o[$i+1]{E} eq '.';
my @inputs = @o[$i, $i+2];
+ #print STDERR Dumper(\@inputs);
next if grep { !is_string($_) } @inputs;
my $q = $inputs[0]{Q};
next if grep { $_->{Q} ne $q } @inputs;
@@ -173,6 +174,7 @@ sub semiparse ($) {
Q => $q,
};
@o = (@o[0..$i-1], $new, @o[$i+3..$#o]);
+ $i--; # counteracts $i++
}
debug $ichunkstart, "semiparsed: ".join ' ', map { $_->{P} } @o;
return @o;