Fixed: RedCloth#block_markdown_rule freezes when parsing many hyphen marks (#1704).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1710 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-07-30 18:28:01 +00:00
parent b91bdf8798
commit 3197814c62
1 changed files with 1 additions and 1 deletions

View 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 )