mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
blockquote tag support for HTML pasting in composer
This commit is contained in:
parent
24e89b6b38
commit
6272f35eec
2 changed files with 32 additions and 5 deletions
|
@ -170,3 +170,17 @@ helloWorld();</code> consectetur.`;
|
|||
|
||||
assert.equal(toMarkdown(html), output);
|
||||
});
|
||||
|
||||
QUnit.test("converts blockquote tag", assert => {
|
||||
let html = "<blockquote>Lorem ipsum</blockquote>";
|
||||
let output = "> Lorem ipsum";
|
||||
assert.equal(toMarkdown(html), output);
|
||||
|
||||
html = "<blockquote>Lorem ipsum</blockquote><blockquote><p>dolor sit amet</p></blockquote>";
|
||||
output = "> Lorem ipsum\n\n> dolor sit amet";
|
||||
assert.equal(toMarkdown(html), output);
|
||||
|
||||
html = "<blockquote>\nLorem ipsum\n<blockquote><p>dolor <blockquote>sit</blockquote> amet</p></blockquote></blockquote>";
|
||||
output = "> Lorem ipsum\n> > dolor\n> > > sit\n> > amet";
|
||||
assert.equal(toMarkdown(html), output);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue