]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/mdwn.pm
git: if no committer identity is known, set it to "IkiWiki <ikiwiki.info>" in .git...
[git.ikiwiki.info.git] / IkiWiki / Plugin / mdwn.pm
index 3c3fc9579fc7fa78959fad3e4ddf7b3bf67ce003..014e78eea124604e249d35d42a6b9ccf6524c254 100644 (file)
@@ -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;
                                }
                        }