diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index 2bfbdf1d..623f2491 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -47,7 +47,7 @@ module Redmine if tag =~ /^h(\d)$/ @toc << [$1.to_i, content] end - content = "" + content + content = "" + content textile_p(tag, atts, cite, content) end @@ -61,7 +61,9 @@ module Redmine div_class << ' right' if $1 == '>' out = "
" @toc.each_with_index do |heading, index| - out << "#{heading.last}" + # remove wiki links from the item + toc_item = heading.last.gsub(/(\[\[|\]\])/, '') + out << "#{toc_item}" end out << '
' out