FIX: Extra space before tags in blockquotes
This commit is contained in:
parent
35d4229847
commit
ac9a763ab3
|
@ -38,6 +38,11 @@ Discourse.Dialect.replaceBlock({
|
|||
var contents = ['blockquote'];
|
||||
if (blockContents.length) {
|
||||
var self = this;
|
||||
|
||||
if (blockContents && (typeof blockContents[0] === "string")) {
|
||||
blockContents[0] = blockContents[0].replace(/^[\s]*/, '');
|
||||
}
|
||||
|
||||
blockContents.forEach(function (bc) {
|
||||
var processed = self.processInline(bc);
|
||||
if (processed.length) {
|
||||
|
|
|
@ -91,6 +91,10 @@ test("quotes", function() {
|
|||
"<aside class=\"quote\"><blockquote><p>test</p></blockquote></aside>",
|
||||
"it supports quotes without params");
|
||||
|
||||
format("[quote]\n*test*\n[/quote]",
|
||||
"<aside class=\"quote\"><blockquote><p><em>test</em></p></blockquote></aside>",
|
||||
"it doesn't insert a new line for italics");
|
||||
|
||||
});
|
||||
|
||||
test("quote formatting", function() {
|
||||
|
|
Loading…
Reference in New Issue