[Po4a-commits] "po4a/lib/Locale/Po4a TeX.pm,1.72,1.73"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Wed Sep 21 19:57:38 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv16097/lib/Locale/Po4a
Modified Files:
TeX.pm
Log Message:
Do not include the file when the \include or \input command is commented.
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- TeX.pm 21 Sep 2005 19:48:01 -0000 1.72
+++ TeX.pm 21 Sep 2005 19:57:36 -0000 1.73
@@ -889,7 +889,11 @@
$linenum++;
my $ref="$filename:$linenum";
# TODO: add support for includeonly
- while ($textline =~ /^(.*)\\(include|input)\{([^\{]*)\}(.*)$/) {
+ # The next regular expression matches \input or \includes that are
+ # not commented (but can be preceded by a \%.
+ while ($textline =~ /^((?:[^%]|(?<!\\)(?:\\\\)*\\%)*)
+ \\(include|input)
+ \{([^\{]*)\}(.*)$/x) {
my ($begin,$newfilename,$end) = ($1,$3,$4);
my $tag = $2;
my $include = 1;
More information about the Po4a-commits
mailing list