]> source.dussan.org Git - redmine.git/commitdiff
Fixed: RedCloth#block_markdown_rule freezes when parsing many hyphen marks (#1704).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 30 Jul 2008 18:28:01 +0000 (18:28 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 30 Jul 2008 18:28:01 +0000 (18:28 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1710 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redcloth.rb

index 59d02fbab3d53adedc41698485353d15ccc8b4c7..df19de22d6d7cf2a3d77aed1e11afba290ed5bd8 100644 (file)
@@ -744,7 +744,7 @@ class RedCloth < String
     end
 
     MARKDOWN_RULE_RE = /^(#{
-        ['*', '-', '_'].collect { |ch| '( ?' + Regexp::quote( ch ) + ' ?){3,}' }.join( '|' )
+        ['*', '-', '_'].collect { |ch| ' ?(' + Regexp::quote( ch ) + ' ?){3,}' }.join( '|' )
     })$/
 
     def block_markdown_rule( text )