summaryrefslogtreecommitdiff
path: root/Locale/Po4a
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-05-31 09:49:22 +0200
committerJonas Smedegaard <dr@jones.dk>2013-10-13 00:47:50 +0200
commit2e73432a51623d2211869824fcdc1d5dc4e6e4bf (patch)
tree65da4fc60e5ed4501c1a0c5bc74fab76e7243ec2 /Locale/Po4a
parent871794cbb16f0297f0b8219feb42d8f5efdf6e63 (diff)
Fix po4a: Treat paragraph-based Markdown markup as such.
Diffstat (limited to 'Locale/Po4a')
-rw-r--r--Locale/Po4a/Text.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/Locale/Po4a/Text.pm b/Locale/Po4a/Text.pm
index 0edb376..77a5cbe 100644
--- a/Locale/Po4a/Text.pm
+++ b/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