From 9c48f8f154e3de105a972efd00bf81116a6802e5 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 30 Jun 2014 18:10:46 -0400 Subject: [PATCH] FIX: Don't surround `\n\n

hello

", "handles new lines properly"); }); @@ -126,8 +131,8 @@ test("quote formatting", function() { test("quotes with trailing formatting", function() { var cooked = Discourse.Markdown.cook("[quote=\"EvilTrout, post:123, topic:456, full:true\"]\nhello\n[/quote]\n*Test*", {lookupAvatar: false}); equal(cooked, - "

\n\n

Test

", + "\n\n

Test

", "it allows trailing formatting"); }); diff --git a/test/javascripts/lib/markdown_test.js b/test/javascripts/lib/markdown_test.js index 863be7f3e0..34d4e9f275 100644 --- a/test/javascripts/lib/markdown_test.js +++ b/test/javascripts/lib/markdown_test.js @@ -161,20 +161,20 @@ test("Quotes", function() { cookedOptions("[quote=\"eviltrout, post: 1\"]\na quote\n\nsecond line\n\nthird line[/quote]", { topicId: 2 }, - "

", + "", "works with multiple lines"); cookedOptions("1[quote=\"bob, post:1\"]my quote[/quote]2", { topicId: 2, lookupAvatar: function(name) { return "" + name; }, sanitize: true }, - "

1

\n\n

\n\n

2

", + "

1

\n\n\n\n

2

", "handles quotes properly"); cookedOptions("1[quote=\"bob, post:1\"]my quote[/quote]2", { topicId: 2, lookupAvatar: function() { } }, - "

1

\n\n

\n\n

2

", + "

1

\n\n\n\n

2

", "includes no avatar if none is found"); });