mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-23 05:15:45 -04:00
FIX: New line after blockquote
This commit is contained in:
parent
f27413219e
commit
67771d6bdf
2 changed files with 9 additions and 3 deletions
|
@ -321,7 +321,7 @@ Discourse.Dialect = {
|
|||
|
||||
if (endFound !== -1) {
|
||||
if (trailingContents) {
|
||||
next.unshift(MD.mk_block(trailingContents));
|
||||
next.unshift(MD.mk_block(trailingContents.replace(/^\s+/, "")));
|
||||
}
|
||||
|
||||
blockContents.push(leadingContents.replace(/\s+$/, ""));
|
||||
|
@ -332,8 +332,6 @@ Discourse.Dialect = {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var emitterResult = args.emitter.call(this, blockContents, m, dialect.options);
|
||||
if (emitterResult) {
|
||||
result.push(emitterResult);
|
||||
|
|
|
@ -95,4 +95,12 @@ 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,
|
||||
"<p><aside class=\"quote\" data-post=\"123\" data-topic=\"456\" data-full=\"true\"><div class=\"title\">" +
|
||||
"<div class=\"quote-controls\"></div>EvilTrout said:</div><blockquote><p>hello</p></blockquote></aside></p>\n\n<p><em>Test</em></p>",
|
||||
"it allows trailing formatting");
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue