js-markdown-extra
js-markdown-extra copied to clipboard
Infinite loop in code block
I've made an copy/paste text from Github markdown.
There's an infinite loop with this text :
```php
function test() { echo "test".$2; };
``
You can reproduce with this (incomplete) test :
QUnit.test("Bug infinite loop", function() {
var input =
'```php' + "\n" +
'function test() { echo "test".$2; }' + "\n" +
'``' + "\n" +
"";
var expected =
"";
var result = Markdown(input); // infinite loop
QUnit.assert.equal(result, expected);
});
Edit: this bug is only for Chrome and Node