Project

General

Profile

Defect #5445 » formatter.rb.diff

Yuki Kita, 2010-06-22 15:59

View differences:

lib/redmine/wiki_formatting/textile/formatter.rb (working copy)
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 }
toc_item.gsub!(LINK_RE) { [$2, $4, $9].join }
# removes styles
# eg. %{color:red}Triggers% => Triggers
toc_item.gsub! %r[%\{[^\}]*\}([^%]+)%], '\\1'
(5-5/5)