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
pull/351/head
Jean-Philippe Lang 16 years ago
parent b91bdf8798
commit 3197814c62
  1. 2
      lib/redcloth.rb

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

Loading…
Cancel
Save