[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.28,1.29"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Wed Oct 26 12:31:44 UTC 2005
- Previous message: [Po4a-commits] "po4a/t 02-TransTractors.t, 1.9,
1.10 10-discard-fuzzy.t, 1.5, 1.6 20-xml.t, 1.4, 1.5 23-man.t,
1.5, 1.6 24-tex.t, 1.1, 1.2"
- Next message: [Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.29,1.30"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv29321/lib/Locale/Po4a
Modified Files:
Xml.pm
Log Message:
Do not break paragraphs on comments, just remove them.
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Xml.pm 30 May 2005 07:05:23 -0000 1.28
+++ Xml.pm 26 Oct 2005 12:31:41 -0000 1.29
@@ -347,7 +347,7 @@
my @tag_types = (
{ beginning => "!--",
end => "--",
- breaking => 1,
+ breaking => 0,
f_extract => \&tag_extract_comment,
f_translate => \&tag_trans_comment},
{ beginning => "?xml",
@@ -468,6 +468,7 @@
my ($self, at tag)=@_;
if ($self->tag_in_list($self->get_path."<".
$self->get_tag_name(@tag).">",@{$self->{inline}})) {
+print "toto1: ".$self->get_tag_name(@tag)."\n";
return 0;
} else {
return 1;
@@ -830,10 +831,22 @@
while (!$eof and !$self->breaking_tag) {
my @text;
- # Append the found inline tag
- ($eof, at text)=$self->get_string_until('>',{include=>1,remove=>1,unquoted=>1});
- push @paragraph, @text;
+ my $type = $self->tag_type;
+ my $f_extract = $tag_types[$type]->{'f_extract'};
+ if ( defined($f_extract)
+ and $f_extract eq \&tag_extract_comment) {
+ # Remove the content of the comments
+ ($eof, @text) = $self->extract_tag($type,1);
+ } else {
+ # Append the found inline tag
+ ($eof, at text)=$self->get_string_until('>',
+ {include=>1,
+ remove=>1,
+ unquoted=>1});
+ push @paragraph, @text;
+ }
+ # Next tag
($eof, at text)=$self->get_string_until('<',{remove=>1});
if ($#text > 0) {
push @paragraph, @text;
- Previous message: [Po4a-commits] "po4a/t 02-TransTractors.t, 1.9,
1.10 10-discard-fuzzy.t, 1.5, 1.6 20-xml.t, 1.4, 1.5 23-man.t,
1.5, 1.6 24-tex.t, 1.1, 1.2"
- Next message: [Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.29,1.30"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Po4a-commits
mailing list