X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/18f35269c26dd23e1c91c5e930ed5d62526b558f..246678fe46bfcacc7f8cadb52807305bb04890de:/IkiWiki/Plugin/mdwn.pm?ds=inline diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 3c3fc9579..014e78eea 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -58,7 +58,7 @@ sub htmlize (@) { } } if (! defined $markdown_sub && - exists $config{nodiscount} && ! $config{nodiscount}) { + (! exists $config{nodiscount} || ! $config{nodiscount})) { eval q{use Text::Markdown::Discount}; if (! $@) { $markdown_sub=sub { @@ -92,8 +92,9 @@ sub htmlize (@) { $markdown_sub=\&Markdown::Markdown; } else { + my $error = $@; do "/usr/bin/markdown" || - error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $@, $!)); + error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $error, $!)); $markdown_sub=\&Markdown::Markdown; } }