From fc4cd326b1d520b9116fc8d2e40e73103f59e7ec Mon Sep 17 00:00:00 2001 From: acli Date: Wed, 25 Feb 2004 06:49:35 +0000 Subject: [PATCH] Try to be a little bit more helpful with "Strange attribute syntax..." warnings. (Actually, is syntax like foo="bar"foo="bar" actually valid?) --- misc/translator/TmplTokenizer.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm index 4b0c8a0835..46acb1c0fb 100644 --- a/misc/translator/TmplTokenizer.pm +++ b/misc/translator/TmplTokenizer.pm @@ -295,7 +295,13 @@ sub _extract_attributes ($;$) { error_normal((scalar(split(/\n/, $s)) - 1) . " more line(s) not shown.", undef); $this->_set_fatal( 1 ); } else { - warn_normal "Strange attribute syntax: $s\n", $lc; + # There's something wrong with the attribute syntax. + # We might be able to deduce a likely cause by looking more. + if ($s =~ /^[a-z0-9]/is && "" =~ /^$re_tag_compat$/s) { + warn_normal "Probably missing whitespace before or missing quotation mark near: $s\n", $lc; + } else { + warn_normal "Strange attribute syntax: $s\n", $lc; + } } } return \%attr; -- 2.39.5