summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-02 16:48:39 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-02 16:49:27 +0100
commitd51d861f48347553c37c9897110886d5f30981f4 (patch)
tree47da3526a7450b3aac815026416d7c3a7ddcd503
parent2b844820d3d171b554c43bcc69b907932201f769 (diff)
i18n: i18n-diff-auditor: Handle comments
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xi18n-diff-auditor3
1 files changed, 2 insertions, 1 deletions
diff --git a/i18n-diff-auditor b/i18n-diff-auditor
index 341733b..a03f0b0 100755
--- a/i18n-diff-auditor
+++ b/i18n-diff-auditor
@@ -220,6 +220,7 @@ sub semiparse ($) {
push @o, { T => 'specvar', E => $&, P => $& };
} elsif (!length) {
last;
+ } elsif (s{^\#.*\n}{}) {
} else {
m{^.{0,10}};
die "cannot tokenise \`$&'";
@@ -251,8 +252,8 @@ our @analysed_x;
our @analysed_y;
sub analyse_chunk_core () {
+ $before //= '';
die "plain deletion\n" unless defined $after;
- die "plain insertion\n" unless defined $before;
my @xs = semiparse $before;
my @ys = semiparse $after;
@analysed_x = @analysed_y = ();