[Po4a-commits] po4a/lib/Locale/Po4a TeX.pm,1.10,1.11
Nicolas FRAN??OIS
po4a-devel@lists.alioth.debian.org
Fri, 04 Feb 2005 21:02:45 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv32056/lib/Locale/Po4a
Modified Files:
TeX.pm
Log Message:
Add support for "% po4a:" lines in the TeX file (not only in the
documentclass file).
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- TeX.pm 4 Feb 2005 20:56:46 -0000 1.10
+++ TeX.pm 4 Feb 2005 21:02:43 -0000 1.11
@@ -692,8 +692,13 @@
chomp($line);
$self->{ref}="$ref";
- # remove comments, and store them in @comments
- if ($line =~ /^([^%]*)(?<!\\)%(.*)$/) { # FIXME: even number of \ ...
+ if ($line =~ /^\s*%\s*po4a\s*:/) {
+ parse_definition_line($self, $line);
+ # FIXME: not always, use return of parse_definition_line?
+ $line = "%";
+ } elsif ($line =~ /^([^%]*)(?<!\\)%(.*)$/) { # FIXME: even number of \ ...
+ #FIXME: in Python-Doc, there is a % in a verbatim environment,which is not a comment.
+ # remove comments, and store them in @comments
push @comments, $2;
# Keep the % sign. It will be removed latter.
$line = "$1%";