[Po4a-commits] "po4a/lib/Locale/Po4a TeX.pm,1.75,1.76"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Wed Sep 21 20:16:20 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv18609/lib/Locale/Po4a
Modified Files:
TeX.pm
Log Message:
Because the brackets in a verbatim environment don't have to be closed,
these environments must be detected earlier (in parse), and separated from
a block immediately.
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- TeX.pm 21 Sep 2005 20:13:11 -0000 1.75
+++ TeX.pm 21 Sep 2005 20:16:17 -0000 1.76
@@ -1108,7 +1108,14 @@
my $closed = is_closed($paragraph);
- if ($closed and $line =~ /^\s*$/) {
+#FIXME: what happens if a \begin{verbatim} or \end{verbatim} is in the
+# middle of a line. (This is only an issue if the verbatim
+# environment contains an un-closed bracket)
+ if ( ($closed and ($line =~ /^\s*$/ or
+ $line =~ /^\s*\\begin{verbatim}\s*$/))
+ or ( defined $env[-1]
+ and $env[-1] eq "verbatim"
+ and $line =~ /^\s*\\end{verbatim}\s*$/)) {
# An empty line. This indicates the end of the current
# paragraph.
$paragraph .= $line."\n";
More information about the Po4a-commits
mailing list