summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/mdwn.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm
index ca8898679..254ab51d0 100644
--- a/IkiWiki/Plugin/mdwn.pm
+++ b/IkiWiki/Plugin/mdwn.pm
@@ -43,9 +43,11 @@ sub htmlize (@) { #{{{
# Workaround for perl bug (#376329)
$content=Encode::encode_utf8($content);
- $content=Encode::encode_utf8($content);
- $content=&$markdown_sub($content);
- $content=Encode::decode_utf8($content);
+ eval {$content=&$markdown_sub($content)};
+ if ($@) {
+ eval {$content=&$markdown_sub($content)};
+ print STDERR $@ if $@;
+ }
$content=Encode::decode_utf8($content);
return $content;