Ugly hack to avoid screenfuls of spurious warnings about "Possible SGML

closed tag notation"
This commit is contained in:
acli 2004-02-25 06:56:42 +00:00
parent fc4cd326b1
commit 8451615142

View file

@ -361,8 +361,14 @@ sub _next_token_internal {
my($head, $tail, $post) = ($1, $2, $3);
if ($tail eq '' && $post =~ $re_tmpl_var) {
# Don't bother to show the warning if we're too confused
# FIXME. There's no method for _closed_start_tag_warning
if (!defined $this->{'_closed_start_tag_warning'}
|| ($this->{'_closed_start_tag_warning'}->[0] eq $head
&& $this->{'_closed_start_tag_warning'}->[1] != $this->line_number - 1)) {
warn_normal "Possible SGML \"closed start tag\" notation: $head<\n", $this->line_number
if split(/\n/, $head) < 10;
}
$this->{'_closed_start_tag_warning'} = [$head, $this->line_number];
} else {
($kind, $it) = (TmplTokenType::TAG, "$head>");
$this->_set_readahead( $post );