diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-15 11:00:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-15 11:00:40 +0000 |
commit | 11e9891425c4fb59ebeb7080077c1097d3800f8c (patch) | |
tree | 483492b396acb21cd166a27a4cfa87caad08c33a /lib | |
parent | 8b2105e20ac76dba21cd8e313a75a5d52850cf69 (diff) | |
download | redmine-11e9891425c4fb59ebeb7080077c1097d3800f8c.tar.gz redmine-11e9891425c4fb59ebeb7080077c1097d3800f8c.zip |
Fixed: TOC does not remove colorization markups (#1423).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1542 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index 7197af2c3..88a858b04 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -85,6 +85,9 @@ module Redmine @toc.each_with_index do |heading, index| # remove wiki links from the item toc_item = heading.last.gsub(/(\[\[|\]\])/, '') + # remove styles + # eg. %{color:red}Triggers% => Triggers + toc_item.gsub! %r[%\{[^\}]*\}([^%]+)%], '\\1' out << "<a href=\"##{index+1}\" class=\"heading#{heading.first}\">#{toc_item}</a>" end out << '</div>' |