X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d6f9d7743167cb4b58f16f1e371585f09dc15a0b..11d5b5c5ea6193e6c6f219b021883a6424b23d38:/IkiWiki/Plugin/color.pm diff --git a/IkiWiki/Plugin/color.pm b/IkiWiki/Plugin/color.pm index 9bb2359ce..e80130d92 100644 --- a/IkiWiki/Plugin/color.pm +++ b/IkiWiki/Plugin/color.pm @@ -38,12 +38,11 @@ sub preserve_style ($$$) { ($background =~ /^[a-z]+$/ || $background =~ /^#[0-9a-f]{3,6}$/)); my $preserved = ''; - $preserved .= ''; + $preserved .= ''.$text.''; + $preserved .= '">'.$text.''; return $preserved; @@ -52,8 +51,7 @@ sub preserve_style ($$$) { sub replace_preserved_style ($) { my $content = shift; - $content =~ s!((color: ([a-z]+|\#[0-9a-f]{3,6})?)?((; )?(background-color: ([a-z]+|\#[0-9a-f]{3,6})?)?)?)!!g; - $content =~ s!!!g; + $content =~ s!\s*\s*!!g; return $content; }