support end-of-line comments

This commit is contained in:
Yann Dirson 2004-08-08 21:27:14 +00:00
parent f9db07ca5a
commit e6da13d052

View file

@ -8,7 +8,7 @@ sub readwml {
while (<TRANS>) {
next if m/^\s*\#/ and !defined $key;
if (m/(\S+)\s*=\s*(?:_\s*)?\"(.*)\"\s*$/) {
if (m/(\S+)\s*=\s*(?:_\s*)?\"(.*)\"\s*(?:\#.*)?$/) {
# single-line
die "nested key" if defined $key;
@ -21,7 +21,7 @@ sub readwml {
$key = $1;
$trans{$key} = $2 . "\n";
} elsif (m/(.*)\"\s*$/) {
} elsif (m/(.*)\"\s*(?:\#.*)?$/) {
# end of multi-line
die "end of string without a key" unless defined $key;