From 22eb7064f293f31d12ebf3dab022f0244a425abe Mon Sep 17 00:00:00 2001 From: acli Date: Sun, 23 Jan 2005 07:05:43 +0000 Subject: [PATCH] This should fix bug 913 --- misc/translator/TmplTokenizer.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm index 30d011dfb3..4637e13047 100644 --- a/misc/translator/TmplTokenizer.pm +++ b/misc/translator/TmplTokenizer.pm @@ -341,14 +341,15 @@ sub identify_js_translatables (@) { } elsif ($state == STATE_UNDERSCORE) { $state = $input[$i] eq parenleft ? STATE_PARENLEFT : 0; } elsif ($state == STATE_PARENLEFT) { - if ($input[$i] =~ /^(['"])(.*)\1$/s) { + if ($input[$i] =~ /^(['"])\s*(.*)\1$/s) { ($state, $j, $q, $s) = (STATE_STRING_LITERAL, $#output, $1, $2); } else { $state = 0; } } elsif ($state == STATE_STRING_LITERAL) { if ($input[$i] eq parenright) { - $output[$j] = [1, $output[$j]->[1], $q, $s]; + my $candidate = $output[$j]->[1]; + $output[$j] = [1, $candidate, $q, $s]; } $state = 0; } else {