diff options
Diffstat (limited to 'Locale')
-rw-r--r-- | Locale/Po4a/Text.pm | 13 |
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; |