support end-of-line comments
This commit is contained in:
parent
f9db07ca5a
commit
e6da13d052
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue