X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a8a58a466cd787e4b75328b2e9d689168dd26ba8..19c126dacb23bcd49fdf610e51c75f55bda23b90:/IkiWiki/Plugin/mdwn.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 3de59ef3d..338468e23 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, multimarkdown => { type => "boolean", @@ -49,6 +50,24 @@ sub htmlize (@) { } } } + if (! defined $markdown_sub) { + eval q{use Text::Markdown::Discount}; + if (! $@) { + $markdown_sub=sub { + my $t=shift; + # Workaround for discount binding bug + # https://rt.cpan.org/Ticket/Display.html?id=73657 + return "" if $t=~/^\s*$/; + # Workaround for discount's eliding + # of