[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.69,1.70"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sun Mar 2 13:27:47 UTC 2008
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv19424/lib/Locale/Po4a
Modified Files:
Xml.pm
Log Message:
Do not remove the spaces at the end of the tags (see earlier commit
today), just remove the spaces (with get_tag_name) when the name of tags
are compared.
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- Xml.pm 2 Mar 2008 00:52:12 -0000 1.69
+++ Xml.pm 2 Mar 2008 13:27:44 -0000 1.70
@@ -853,7 +853,6 @@
}
$tag[0] =~ /^<\Q$match1\E(.*)$/s;
$tag[0] = $1;
- $tag[0] =~ s/\s*$//s;
$tag[$#tag-1] =~ /^(.*)\Q$match2\E>$/s;
$tag[$#tag-1] = $1;
return ($eof, at tag);
@@ -1242,13 +1241,14 @@
# Check if this is closing the
# last opening tag we detected.
my $test = pop @path;
+ my $name = $self->get_tag_name(@tag);
if (!defined($test) ||
- $test ne $tag[0] ) {
+ $test ne $name ) {
my $ontagerror = $self->{options}{'ontagerror'};
if ($ontagerror eq "warn") {
- warn wrap_ref_mod($tag[1], "po4a::xml", dgettext("po4a", "Unexpected closing tag </%s> found. The main document may be wrong. Continuing..."), $tag[0]);
+ warn wrap_ref_mod($tag[1], "po4a::xml", dgettext("po4a", "Unexpected closing tag </%s> found. The main document may be wrong. Continuing..."), $name);
} elsif ($ontagerror ne "silent") {
- die wrap_ref_mod($tag[1], "po4a::xml", dgettext("po4a", "Unexpected closing tag </%s> found. The main document may be wrong."), $tag[0]);
+ die wrap_ref_mod($tag[1], "po4a::xml", dgettext("po4a", "Unexpected closing tag </%s> found. The main document may be wrong."), $name);
}
}
More information about the Po4a-commits
mailing list