2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

Merge pull request #2592 from Elberet/fix-parser

Fixes for quirky markdown parser behaviours
This commit is contained in:
Robin Ward 2014-07-28 13:12:22 -04:00
commit 8866141ba2
6 changed files with 128 additions and 97 deletions

View file

@ -36,6 +36,7 @@ test("Auto quoting", function() {
"it converts single line quotes to blockquotes");
cooked('"hello\nworld"', "<p>\"hello<br/>world\"</p>", "It doesn't convert multi line quotes");
cooked('"hello "evil" trout"', '<p>"hello "evil" trout"</p>', "it doesn't format quotes in the middle of a line");
cooked('["text"', '<p>["text"</p>', "it recognizes leading tag-like text");
});
test("Traditional Line Breaks", function() {
@ -315,7 +316,7 @@ test("links with full urls", function() {
test("Code Blocks", function() {
cooked("<pre>\nhello\n</pre>\n",
"<p><pre>\nhello</pre></p>",
"<p><pre>hello</pre></p>",
"pre blocks don't include extra lines");
cooked("```\na\nb\nc\n\nd\n```",