mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
PERF: Better handling of headings in HTML inline pasting
This commit is contained in:
parent
8175740e87
commit
4f2f42d710
3 changed files with 10 additions and 5 deletions
|
@ -21,8 +21,12 @@ QUnit.test("converts inline nested styles", assert => {
|
|||
});
|
||||
|
||||
QUnit.test("converts a link", assert => {
|
||||
const html = `<a href="https://discourse.org">Discourse</a>`;
|
||||
const markdown = `[Discourse](https://discourse.org)`;
|
||||
let html = `<a href="https://discourse.org">Discourse</a>`;
|
||||
let markdown = `[Discourse](https://discourse.org)`;
|
||||
assert.equal(toMarkdown(html), markdown);
|
||||
|
||||
html = `<a href="https://discourse.org">Disc\n\n\nour\n\nse</a>`;
|
||||
markdown = `[Disc\nour\nse](https://discourse.org)`;
|
||||
assert.equal(toMarkdown(html), markdown);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue