summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-29 16:33:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-29 16:33:45 +0000
commitcf566a0c7243010ab8713c08a593027928f31560 (patch)
tree8998b388ba0692b05b38e0d14ae788f8a5ccfeb5 /lib
parent945ec8942a4c43ed41aa4302cbe74ad45f1ff08c (diff)
downloadredmine-cf566a0c7243010ab8713c08a593027928f31560.tar.gz
redmine-cf566a0c7243010ab8713c08a593027928f31560.zip
Fixed: TOC does not parse wiki page reference links with description (#2601).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2336 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/wiki_formatting/textile/formatter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb
index b55287ba4..67e3579df 100644
--- a/lib/redmine/wiki_formatting/textile/formatter.rb
+++ b/lib/redmine/wiki_formatting/textile/formatter.rb
@@ -65,7 +65,7 @@ module Redmine
# Patch to add 'table of content' support to RedCloth
def textile_p_withtoc(tag, atts, cite, content)
# removes wiki links from the item
- toc_item = content.gsub(/(\[\[|\]\])/, '')
+ toc_item = content.gsub(/(\[\[([^\]\|]*)(\|([^\]]*))?\]\])/) { $4 || $2 }
# removes styles
# eg. %{color:red}Triggers% => Triggers
toc_item.gsub! %r[%\{[^\}]*\}([^%]+)%], '\\1'