mirror of
https://github.com/redmine/redmine.git
synced 2026-07-04 12:59:00 +02:00
Merged r3786 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3794 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -67,6 +67,9 @@ module Redmine
|
||||
def textile_p_withtoc(tag, atts, cite, content)
|
||||
# removes wiki links from the item
|
||||
toc_item = content.gsub(/(\[\[([^\]\|]*)(\|([^\]]*))?\]\])/) { $4 || $2 }
|
||||
# sanitizes titles from links
|
||||
# see redcloth3.rb, same as "#{pre}#{text}#{post}"
|
||||
toc_item.gsub!(LINK_RE) { $2+$4+$9 }
|
||||
# removes styles
|
||||
# eg. %{color:red}Triggers% => Triggers
|
||||
toc_item.gsub! %r[%\{[^\}]*\}([^%]+)%], '\\1'
|
||||
|
||||
Reference in New Issue
Block a user