Project

General

Profile

« Previous | Next » 

Revision 1710

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

View differences:

redcloth.rb
744 744
    end
745 745

  
746 746
    MARKDOWN_RULE_RE = /^(#{
747
        ['*', '-', '_'].collect { |ch| '( ?' + Regexp::quote( ch ) + ' ?){3,}' }.join( '|' )
747
        ['*', '-', '_'].collect { |ch| ' ?(' + Regexp::quote( ch ) + ' ?){3,}' }.join( '|' )
748 748
    })$/
749 749

  
750 750
    def block_markdown_rule( text )

Also available in: Unified diff