markdown-js
markdown-js copied to clipboard
Maruku dialect TypeError: Cannot read property 'splice' of undefined
Hi,
the following snippet raises a TypeError: Cannot read property 'splice' of undefined
error. Not sure about what is going on exactly. The markdown below is a minimal example from a more complex case that initially triggered the error. Even the source text looks terrible, would be nice if markdown-js could not break.
var markdown = require( "markdown" ).markdown;
md_content = 'Foo: Bar \n{: style=" key: value; }'
html_content = markdown.toHTML( md_content, 'Maruku');
Thanks,
Weirdly, this error seems to occur whenever the first word in a line ends with a colon.
"foo: bar \n{: .aclass }" // error
"foo : bar \n{: .aclass }" // no error
markdown.min.js:1 Uncaught TypeError: Cannot read property 'splice' of undefined
at m.u.block.block_meta (markdown.min.js:1)
at m.processBlock (markdown.min.js:1)
at m.toTree (markdown.min.js:1)
at Object.m.parse (markdown.min.js:1)