summaryrefslogtreecommitdiff
path: root/perl/Locale/Po4a
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Locale/Po4a')
-rw-r--r--perl/Locale/Po4a/Text.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl/Locale/Po4a/Text.pm b/perl/Locale/Po4a/Text.pm
index 0edb376..77a5cbe 100644
--- a/perl/Locale/Po4a/Text.pm
+++ b/perl/Locale/Po4a/Text.pm
@@ -175,17 +175,21 @@ sub parse {
$paragraph="";
$wrapped_mode = 1;
} elsif ($markdown and
- ( $line =~ m/^#/ # headline
- or $line =~ m/^>/ # blockquote
- or $line =~ m/[<>]/ # maybe html
- or $line =~ m/^"""/ # textblock inside macro end
- or $line =~ m/"""$/)) { # textblock inside macro begin
- # Found headline
+ ( $line =~ m/^#/)) {
+ # Found Markdown headline
$wrapped_mode = 0;
$paragraph .= $line."\n";
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";
$wrapped_mode = 1;
+ } elsif ($markdown and
+ ( $paragraph =~ m/^>/ # blockquote
+ or $paragraph =~ m/[<>]/ # maybe html
+ or $paragraph =~ m/^"""/ # textblock inside macro end
+ or $paragraph =~ m/"""$/)) { # textblock inside macro begin
+ # Found Markdown markup that might not survive wrapping
+ $wrapped_mode = 0;
+ $paragraph .= $line."\n";
} else {
if ($line =~ /^\s/) {
# A line starting by a space indicates a non-wrap