OSDN Git Service

Small fix to TOC regexp.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Sep 2007 10:41:02 +0000 (10:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Sep 2007 10:41:02 +0000 (10:41 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@719 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting.rb

index 2d26cab..2bfbdf1 100644 (file)
@@ -56,7 +56,7 @@ module Redmine
       alias :textile_h3 :textile_p_withtoc
       
       def inline_toc(text)
-        text.gsub!(/<p>\{\{(<>?)toc\}\}<\/p>/i) do
+        text.gsub!(/<p>\{\{([<>]?)toc\}\}<\/p>/i) do
           div_class = 'toc'
           div_class << ' right' if $1 == '>'
           out = "<div class=\"#{div_class}\">"