hr abutting a spaced list crashes #17

Open
benw opened this Issue Mar 25, 2011 · 1 comment

2 participants

@benw

The following is interpreted as an hr abutting a list, and then throws. (I was hoping for a heading not an hr, obviously.)

1. First
2. Second

1. First
--------

Backtrace, from 4816d73:

markdown.js:370
        jsonml.unshift.apply( jsonml, this.processBlock( m[ 1 ], [] ) );
                                           ^
TypeError: Object #<an Object> has no method 'processBlock'
    at Object.horizRule (markdown.js:370:44)
    at Markdown.<anonymous> (markdown.js:620:41)
    at Markdown.processBlock (markdown.js:197:29)
    at Markdown.toTree (markdown.js:234:20)
    at Object.parse (markdown.js:66:13)
    at Object.toHTMLTree (markdown.js:97:48)
    at Object.toHTML (markdown.js:79:22)
@kragen

I am seeing this in Chromium too. (Although I'm on isaacs' fork, so I wouldn't know if this had been fixed in mainline.)

My traceback has slightly more useful function names:

Uncaught TypeError: Object #<Object> has no method 'processBlock'
horizRule                                               markdown-js/lib/markdown.js:370
Markdown.dialects.Gruber.block.lists                    markdown-js/lib/markdown.js:620
processBlock                                            markdown-js/lib/markdown.js:197
toTree                                                  markdown-js/lib/markdown.js:234
expose.parse                                            markdown-js/lib/markdown.js:66
toHTMLTree                                              markdown-js/lib/markdown.js:97
toHTML                                                  markdown-js/lib/markdown.js:79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment