summaryrefslogtreecommitdiff
path: root/perl/Locale/Po4a
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-05-31 12:58:40 +0200
committerJonas Smedegaard <dr@jones.dk>2008-05-31 14:59:36 +0200
commit805fc78a006ed14fb0830d4e752dbabc6cff4382 (patch)
tree47943f2cdde836c476eebdd69d2e16b79fa7bbe7 /perl/Locale/Po4a
parent6010a16bcfd29e419225eca92d70e9d9f070af32 (diff)
Fix po4a: Really treat line-based Markdown markup as such.
Diffstat (limited to 'perl/Locale/Po4a')
-rw-r--r--perl/Locale/Po4a/Text.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl/Locale/Po4a/Text.pm b/perl/Locale/Po4a/Text.pm
index 77a5cbe..eb8ded9 100644
--- a/perl/Locale/Po4a/Text.pm
+++ b/perl/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