gamefreak / snuownd

Javascript port of Reddit's "SnuDown" markdown parser.
34 stars 19 forks source link

Contiguous lines treated as part of the same header #7

Open JordanMilne opened 9 years ago

JordanMilne commented 9 years ago

As demonstrated by foo\nbar\n---. Snudown will only include the first line above the dashes in the <h2>, SnuOwnd will include both. The behaviour is correct if there are there is a blank line between "foo" and "bar", ex:

Markdown Snudown Redering SnuOwnd Rendering
foo\nbar\n--- <p>foo</p>\n\n<h2>bar</h2>\n <h2>foo\nbar</h2>\n
foo\n\nbar\n--- <p>foo</p>\n\n<h2>bar</h2>\n <p>foo</p>\n\n<h2>bar</h2>\n