Merge pull request #6327 from vinothkannans/rich-text-pasting

FIX: Keep emojis and remove clicks count on html to markdown
This commit is contained in:
Vinoth Kannan
2018-08-29 13:38:55 +05:30
committed by GitHub
3 changed files with 38 additions and 8 deletions

View File

@ -314,3 +314,16 @@ QUnit.test("keeps mention/hash class", assert => {
assert.equal(toMarkdown(html), markdown);
});
QUnit.test("keeps emoji and removes click count", assert => {
const html = `
<p>
A <a href="http://example.com">link</a><span class="badge badge-notification clicks" title="1 click">1</span> with click count
and <img class="emoji" title=":boom:" src="https://d11a6trkgmumsb.cloudfront.net/images/emoji/twitter/boom.png?v=5" alt=":boom:" /> emoji.
</p>
`;
const markdown = `A [link](http://example.com) with click count and :boom: emoji.`;
assert.equal(toMarkdown(html), markdown);
});