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\nhello",
+ "
abc
\n\nhello
",
"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\nTest
",
+ "\n\nTest
",
"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 },
- "" +
- "a quote
second line
third line
",
+ "" +
+ "a quote
second line
third line
",
"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\n2
",
+ "1
\n\n\n\n2
",
"handles quotes properly");
cookedOptions("1[quote=\"bob, post:1\"]my quote[/quote]2",
{ topicId: 2, lookupAvatar: function() { } },
- "1
\n\n\n\n2
",
+ "1
\n\n\n\n2
",
"includes no avatar if none is found");
});