From 3197814c623f3541bb8b66c11af70eeedbfbee52 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 30 Jul 2008 18:28:01 +0000 Subject: [PATCH] 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 --- lib/redcloth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redcloth.rb b/lib/redcloth.rb index 59d02fbab..df19de22d 100644 --- a/lib/redcloth.rb +++ b/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 ) -- 2.39.5