Fixed: Wiki headings containing backslash followed by a digit are not displayed correctly (#7846).

Contributed by Etienne Massip.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5100 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-03-12 18:28:30 +00:00
parent 1423890735
commit 7db930f1b4
2 changed files with 13 additions and 5 deletions
+4 -2
View File
@@ -707,11 +707,13 @@ class RedCloth3 < String
atts = pba( atts )
# pass to prefix handler
replacement = nil
if respond_to? "textile_#{ tag }", true
text.gsub!( $&, method( "textile_#{ tag }" ).call( tag, atts, cite, content ) )
replacement = method( "textile_#{ tag }" ).call( tag, atts, cite, content )
elsif respond_to? "textile_#{ tagpre }_", true
text.gsub!( $&, method( "textile_#{ tagpre }_" ).call( tagpre, num, atts, cite, content ) )
replacement = method( "textile_#{ tagpre }_" ).call( tagpre, num, atts, cite, content )
end
text.gsub!( $& ) { replacement } if replacement
end
end