summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-05-31 12:58:40 +0200
committerJonas Smedegaard <dr@jones.dk>2013-10-13 00:47:50 +0200
commit0bba7ecd8f8d89b39c5ada631e298b5f05678b32 (patch)
tree41357a741ec577103fa2ce5e3a05433200c629dc
parent2e73432a51623d2211869824fcdc1d5dc4e6e4bf (diff)
Fix po4a: Really treat line-based Markdown markup as such.
-rw-r--r--Locale/Po4a/Text.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Locale/Po4a/Text.pm b/Locale/Po4a/Text.pm
index 77a5cbe..eb8ded9 100644
--- a/Locale/Po4a/Text.pm
+++ b/Locale/Po4a/Text.pm
@@ -175,11 +175,11 @@ sub parse {
$paragraph="";
$wrapped_mode = 1;
} elsif ($markdown and
- ( $line =~ m/^#/)) {
- # Found Markdown headline
- $wrapped_mode = 0;
- $paragraph .= $line."\n";
+ ( $line =~ /^#/ # headline
+ or $line =~ /^\s*\[\[\!\S[^\]]*\]\]\s*$/)) { # sole macro
+ # Found Markdown markup that should be preserved as a single line
do_paragraph($self,$paragraph,$wrapped_mode);
+ do_paragraph($self,$line."\n",0);
$paragraph="";
$wrapped_mode = 1;
} elsif ($markdown and