diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-15 16:19:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-15 16:19:22 -0400 |
commit | b38261a03aab649e3b194b7d1983536eee8a3684 (patch) | |
tree | e8bb17847c1c87e509613bdf27d111adfe58a53d /IkiWiki/Plugin | |
parent | 258412bd4368feecbd724ea88e7a98644c7fbec1 (diff) | |
download | ikiwiki-b38261a03aab649e3b194b7d1983536eee8a3684.tar ikiwiki-b38261a03aab649e3b194b7d1983536eee8a3684.tar.gz |
Workaround discount's eliding of <style> blocks.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/mdwn.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index b10d08517..338468e23 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -54,10 +54,17 @@ sub htmlize (@) { 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 $_[0]=~/^\s*$/; - Text::Markdown::Discount::markdown(@_); + return "" if $t=~/^\s*$/; + # Workaround for discount's eliding + # of <style> blocks. + # https://rt.cpan.org/Ticket/Display.html?id=74016 + $t=~s/<style/<elyts/ig; + my $r=Text::Markdown::Discount::markdown($t); + $r=~s/<elyts/<style/ig; + return $r; } } } |