summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2011-10-06 16:48:53 +0200
committerJonas Smedegaard <dr@jones.dk>2013-10-13 00:52:58 +0200
commit2dbdf2509fe3f5d9604cfbcbe2d996d81257974d (patch)
tree17dad1e70c9fe8722a5298070079e10479e530af
parent254ff5220c270371cb85b10cc30e284c4ec397a9 (diff)
Sync with po4a 0.41-1.
-rw-r--r--Locale/Po4a/Text.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/Locale/Po4a/Text.pm b/Locale/Po4a/Text.pm
index bbb78af..02cae98 100644
--- a/Locale/Po4a/Text.pm
+++ b/Locale/Po4a/Text.pm
@@ -76,7 +76,7 @@ rewrap this paragraph in the generated PO file and in the translation.
my $bullets = 1;
-=item B<tabs>=I<mode>
+=item B<tabs=>I<mode>
Specify how tabulations shall be handled. The I<mode> can be any of:
@@ -98,7 +98,7 @@ By default, tabulations are considered as spaces.
my $tabs = "";
-=item B<breaks>=I<regex>
+=item B<breaks=>I<regex>
A regular expression matching lines which introduce breaks.
The regular expression will be anchored so that the whole line must match.
@@ -135,7 +135,7 @@ my $markdown = 0;
=item B<asciidoc>
-Handle documents in the asciidoc format.
+Handle documents in the AsciiDoc format.
=cut
@@ -273,14 +273,15 @@ sub parse {
$wrapped_mode = 0;
my $level = $line;
$level =~ s/^(.).*$/$1/;
+ $paragraph =~ s/\n$//s;
my $t = $self->translate($paragraph,
$self->{ref},
"Title $level",
"wrap" => 0);
- $self->pushline($t);
+ $self->pushline($t."\n");
$paragraph="";
$wrapped_mode = 1;
- $self->pushline(($level x (length($t)-1))."\n");
+ $self->pushline(($level x (length($t)))."\n");
} elsif ($asciidoc and
($line =~ m/^(={1,5})( +)(.*?)( +\1)?$/)) {
my $titlelevel1 = $1;
@@ -534,7 +535,7 @@ sub parse {
# XXX: There can be any number of underlining according
# to the documentation. This detection, which avoid
# translating the formatting, is only supported if
- # the underlining has the same size as the herder text.
+ # the underlining has the same size as the header text.
# Found title
$wrapped_mode = 0;
my $level = $line;