From 2dbdf2509fe3f5d9604cfbcbe2d996d81257974d Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 6 Oct 2011 16:48:53 +0200 Subject: Sync with po4a 0.41-1. --- Locale/Po4a/Text.pm | 13 +++++++------ 1 file 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=I +=item BI Specify how tabulations shall be handled. The I can be any of: @@ -98,7 +98,7 @@ By default, tabulations are considered as spaces. my $tabs = ""; -=item B=I +=item BI 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 -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; -- cgit v1.2.3