X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9cee2962e01ef0538cc8498951867a543f91b47d..d95f6fd87e1dfbec96ba810a67f4fc991c3f31e7:/IkiWiki/Plugin/mdwn.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index b892eabee..b10d08517 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -50,6 +50,17 @@ sub htmlize (@) { } } } + if (! defined $markdown_sub) { + eval q{use Text::Markdown::Discount}; + if (! $@) { + $markdown_sub=sub { + # Workaround for discount binding bug + # https://rt.cpan.org/Ticket/Display.html?id=73657 + return "" if $_[0]=~/^\s*$/; + Text::Markdown::Discount::markdown(@_); + } + } + } if (! defined $markdown_sub) { eval q{use Text::Markdown}; if (! $@) {