X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a303321e5ed7b68e0fce32a2a6fe10d268670a5a..49d56c3957668e54b4eb475f195ab019adffae40:/doc/todo/progressbar_plugin.mdwn diff --git a/doc/todo/progressbar_plugin.mdwn b/doc/todo/progressbar_plugin.mdwn index d8c0a5cec..436da4e1b 100644 --- a/doc/todo/progressbar_plugin.mdwn +++ b/doc/todo/progressbar_plugin.mdwn @@ -62,6 +62,11 @@ Any comments? --[[PaweÅ|ptecza]] >>> Thank you for the code! I know how to fix that problem, because I had >>> the same issue while writing [[todo/color_plugin]] :) --[[PaweÅ|ptecza]] +>>>> Ahh - good idea. Patch updated to work with HTMLScrubber. --[[Will]] + +>>>>> I like it, but I think that Joey should take a look at that patch too :) +>>>>> --[[PaweÅ|ptecza]] + #!/usr/bin/perl package IkiWiki::Plugin::progress; @@ -74,6 +79,7 @@ Any comments? --[[PaweÅ|ptecza]] sub import { #{{{ hook(type => "getsetup", id => "progress", call => \&getsetup); hook(type => "preprocess", id => "progress", call => \&preprocess); + hook(type => "format", id => "progress", call => \&format); } # }}} sub getsetup () { #{{{ @@ -124,4 +130,38 @@ Any comments? --[[PaweÅ|ptecza]] } # }}} + sub format(@) { #{{{ + my %params = @_; + + # If HTMLScrubber has removed the style attribute, then bring it back + + $params{content} =~ s!