FIX: Extra space before tags in blockquotes

This commit is contained in:
Robin Ward 2013-11-07 16:06:50 -05:00
parent 35d4229847
commit ac9a763ab3
2 changed files with 9 additions and 0 deletions

View File

@ -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) {

View File

@ -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() {