[Po4a-commits] r2759 - in /trunk: NEWS lib/Locale/Po4a/Man.pm
mquinson at users.alioth.debian.org
mquinson at users.alioth.debian.org
Fri Jun 20 08:45:51 UTC 2014
Author: mquinson
Date: Fri Jun 20 08:45:51 2014
New Revision: 2759
URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2759
Log:
Fix handling of preprocessor lines (thanks to Robert Luberda for the patch)
Modified:
trunk/NEWS
trunk/lib/Locale/Po4a/Man.pm
Modified: trunk/NEWS
URL: http://svn.debian.org/wsvn/po4a/trunk/NEWS?rev=2759&op=diff
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Jun 20 08:45:51 2014
@@ -1,4 +1,12 @@
po4a NEWS
+
+=======================================================================
+
+* Major changes in release 0.46 (not released yet)
+
+Man:
+ * Fix handling of preprocessor lines (Debian's #744366)
+ Thanks to Robert Luberda for the patch.
=======================================================================
Modified: trunk/lib/Locale/Po4a/Man.pm
URL: http://svn.debian.org/wsvn/po4a/trunk/lib/Locale/Po4a/Man.pm?rev=2759&op=diff
==============================================================================
--- trunk/lib/Locale/Po4a/Man.pm (original)
+++ trunk/lib/Locale/Po4a/Man.pm Fri Jun 20 08:45:51 2014
@@ -687,7 +687,7 @@
if ($line =~ m/^[.']*$/) {
if ($c !~ m/^\s+$/) {
# This commentted line may be comment for the next paragraph
- push @next_comments, $c;
+ push @next_comments, [substr($line,0,1),$c];
}
if ($line =~ m/^[.']+$/) {
# those lines are ignored
@@ -699,7 +699,7 @@
goto NEW_LINE;
}
} else {
- push @comments, $c;
+ push @comments, ['.', $c];
}
} else {
# finally, we did not reach the end of the paragraph. The comments
@@ -833,7 +833,7 @@
# add comments
foreach my $c (@comments) {
# comments are pushed (maybe at the wrong place).
- $self->SUPER::pushline($self->r(".\\\"$c\n"));
+ $self->SUPER::pushline($self->r("$$c[0]\\\"$$c[1]\n"));
}
@comments = ();
}
@@ -1188,7 +1188,7 @@
}
$str=pre_trans($self,$str,$ref||$self->{ref},$type);
- $options{'comment'} .= join('\n', @comments);
+ $options{'comment'} .= join('\n', map{ $$_[1] } @comments);
# Translate this
$str = $self->SUPER::translate($str,
$ref||$self->{ref},
@@ -1405,7 +1405,7 @@
@next_comments = @comments;
@comments = ();
for my $c (@next_comments) {
- $self->pushline($self->r(".\\\"$c\n"));
+ $self->pushline($self->r("$$c[0]\\\"$$c[1]\n"));
}
# reinitialize the module
More information about the Po4a-commits
mailing list