FIX: Missing title attribute when quoting an image.

This commit is contained in:
Guo Xiang Tan
2019-06-06 16:45:12 +08:00
parent 2265c5102f
commit 782da448a2
2 changed files with 5 additions and 1 deletions

View File

@ -166,6 +166,9 @@ QUnit.test("converts img tag", assert => {
let html = `<img src="${url}" width="100" height="50">`;
assert.equal(toMarkdown(html), `![|100x50](${url})`);
html = `<img src="${url}" width="100" height="50" title="some title">`;
assert.equal(toMarkdown(html), `![|100x50](${url} "some title")`);
html = `<div><span><img src="${url}" alt="description" width="50" height="100" /></span></div>`;
assert.equal(toMarkdown(html), `![description|50x100](${url})`);