diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-03-12 18:28:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-03-12 18:28:30 +0000 |
commit | 7db930f1b44b0db404aff931b744b566256a3602 (patch) | |
tree | d1c5ffea2e79aa8ee1f7d5d731d1c349621edf76 /lib/redcloth3.rb | |
parent | 14238907354a6d4c0960556f2f48811119dc11c9 (diff) | |
download | redmine-7db930f1b44b0db404aff931b744b566256a3602.tar.gz redmine-7db930f1b44b0db404aff931b744b566256a3602.zip |
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
Diffstat (limited to 'lib/redcloth3.rb')
-rw-r--r-- | lib/redcloth3.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index 7c9df0727..848aa7042 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -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 |