summaryrefslogtreecommitdiff
path: root/Locale
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-05-31 09:49:22 +0200
committerJonas Smedegaard <dr@jones.dk>2008-05-31 09:49:22 +0200
commit8aa3c6c587e99725deb4f98e48bd5ad7e082435b (patch)
tree2c37db271d69a3ee658534c0328e40274df609f5 /Locale
parente03ed20efd2cf21bc0e6225c7304d50a4d8e42b1 (diff)
Fix po4a: Treat paragraph-based Markdown markup as such.
Diffstat (limited to 'Locale')
-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