From a2f07d16f09a8fe1f3ba4b02e32c6920297ce840 Mon Sep 17 00:00:00 2001 From: acli Date: Sat, 14 Feb 2004 05:35:04 +0000 Subject: [PATCH] Hmm. I didn't know there can be whitespace before and/or after = in attributes... --- misc/translator/text-extract2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/translator/text-extract2.pl b/misc/translator/text-extract2.pl index 250ac25658..77472f76f3 100755 --- a/misc/translator/text-extract2.pl +++ b/misc/translator/text-extract2.pl @@ -74,7 +74,7 @@ sub extract_attributes ($;$) { $s = $1 if $s =~ /^<\S+(.*)\/\S$/s # XML-style self-closing tags || $s =~ /^<\S+(.*)\S$/s; # SGML-style tags - for (my $i = 0; $s =~ /^\s+(?:([a-zA-Z][-a-zA-Z0-9]*)=)?('((?:$re_directive|[^'])*)'|"((?:$re_directive|[^"])*)"|(($re_directive|[^\s<>])+))/os;) { + for (my $i = 0; $s =~ /^\s+(?:([a-zA-Z][-a-zA-Z0-9]*)\s*=\s*)?('((?:$re_directive|[^'])*)'|"((?:$re_directive|[^"])*)"|(($re_directive|[^\s<>])+))/os;) { my($key, $val, $val_orig, $rest) = ($1, (defined $3? $3: defined $4? $4: $5), $2, $'); $i += 1; -- 2.39.5