[Po4a-commits] po4a/lib/Locale/Po4a TeX.pm,1.8,1.9
Nicolas FRAN??OIS
po4a-devel@lists.alioth.debian.org
Fri, 04 Feb 2005 20:49:02 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv31292/lib/Locale/Po4a
Modified Files:
TeX.pm
Log Message:
Break paragraphs at the beginning of environment blocks.
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- TeX.pm 4 Feb 2005 20:23:38 -0000 1.8
+++ TeX.pm 4 Feb 2005 20:49:00 -0000 1.9
@@ -693,6 +693,14 @@
$paragraph="";
}
$self->pushline($line."\n");
+ } elsif ($line =~ /^\\begin\{/) {
+ # break the paragraph at the beginning of a new environment.
+ $paragraph =~ s/(?<!\\)%$//; # FIXME: even number of \ ...
+ if (length($paragraph)) {
+ ($t, @env) = translate_buffer($self,$paragraph,@env);
+ $self->pushline($t);
+ }
+ $paragraph = $line."\n";
} else {
# continue the same paragraph
if ($paragraph =~ /(?<!\\)%$/) { # FIXME: even number of \ ...