mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:13:25 +08:00
Grab dimention of the clipboard images
This commit is contained in:
@ -106,11 +106,11 @@ QUnit.test("converts table as readable", assert => {
|
||||
|
||||
QUnit.test("converts img tag", assert => {
|
||||
const url = "https://example.com/image.png";
|
||||
let html = `<img src="${url}">`;
|
||||
assert.equal(toMarkdown(html), ``);
|
||||
let html = `<img src="${url}" width="100" height="50">`;
|
||||
assert.equal(toMarkdown(html), ``);
|
||||
|
||||
html = `<div><span><img src="${url}" alt="description" /></span></div>`;
|
||||
assert.equal(toMarkdown(html), ``);
|
||||
html = `<div><span><img src="${url}" alt="description" width="50" height="100" /></span></div>`;
|
||||
assert.equal(toMarkdown(html), ``);
|
||||
|
||||
html = `<a href="http://example.com"><img src="${url}" alt="description" /></a>`;
|
||||
assert.equal(toMarkdown(html), `[](http://example.com)`);
|
||||
|
Reference in New Issue
Block a user