Defect #5445 » formatter.rb.diff
| 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'
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »