mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 02:23:44 +08:00
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'];
|
var contents = ['blockquote'];
|
||||||
if (blockContents.length) {
|
if (blockContents.length) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
if (blockContents && (typeof blockContents[0] === "string")) {
|
||||||
|
blockContents[0] = blockContents[0].replace(/^[\s]*/, '');
|
||||||
|
}
|
||||||
|
|
||||||
blockContents.forEach(function (bc) {
|
blockContents.forEach(function (bc) {
|
||||||
var processed = self.processInline(bc);
|
var processed = self.processInline(bc);
|
||||||
if (processed.length) {
|
if (processed.length) {
|
||||||
|
|
|
@ -91,6 +91,10 @@ test("quotes", function() {
|
||||||
"<aside class=\"quote\"><blockquote><p>test</p></blockquote></aside>",
|
"<aside class=\"quote\"><blockquote><p>test</p></blockquote></aside>",
|
||||||
"it supports quotes without params");
|
"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() {
|
test("quote formatting", function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user