[Po4a-commits] po4a/lib/Locale/Po4a TeX.pm,1.51,1.52
Nicolas FRAN??OIS
po4a-devel@lists.alioth.debian.org
Sun, 03 Apr 2005 22:44:34 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv521/lib/Locale/Po4a
Modified Files:
TeX.pm
Log Message:
Some minor typo/doc fixes.
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- TeX.pm 11 Mar 2005 23:41:18 -0000 1.51
+++ TeX.pm 3 Apr 2005 22:44:31 -0000 1.52
@@ -90,6 +90,8 @@
# hash of known commands and environments, with parsing sub.
# See end of this file
use vars qw(%commands %environments);
+# hash to describe the number of parameters and which one have to be
+# translated. Used by generic commands
our %command_parameters = ();
# The escape character used to introduce commands.
@@ -631,19 +633,21 @@
# remove comments from the buffer.
# Comments are stored in an array and shown as comments in the PO.
- while ($buffer =~ m/((?<!\\)(?:\\\\)*)%([^\n]*)(\n[ \t]*)(.*)$/s) { # removed |$ at the end
+ while ($buffer =~ m/((?<!\\)(?:\\\\)*)%([^\n]*)(\n[ \t]*)(.*)$/s) {
+ my $comment = $2;
my $end = "";
if ($4 =~ m/^\n/s and $buffer !~ m/^%/s) {
# a line with comments, followed by an empty line.
# Keep the empty line, but remove the comment.
- # This is an empiracal euristic, but seems to work;)
+ # This is an empirical heuristic, but seems to work;)
$end = "\n";
}
- if (defined $2 and $2 !~ /^\s*$/) {
- push @comments, $2;
+ if (defined $comment and $comment !~ /^\s*$/s) {
+ push @comments, $comment;
}
- $buffer =~ s/((?<!\\)(?:\\\\)*)%([^\n]*)(\n[ \t]*)/$1$end/s;
+ $buffer =~ s/((?<!\\)(?:\\\\)*)%([^\n]*)(\n[ \t]*)/$1$end/s;
}
+
# translate leading commands.
do {