mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-10-18 13:11:11 +08:00
fix: default html img resize if no height included (#1065)
* fix: default html img resize if no height included * chore: adjust render test to not expect height
This commit is contained in:
@@ -22,7 +22,7 @@ export const imageCompiler = ({ renderer, contentBase, router }) =>
|
||||
if (height) {
|
||||
attrs.push(`width="${width}" height="${height}"`);
|
||||
} else {
|
||||
attrs.push(`width="${width}" height="${width}"`);
|
||||
attrs.push(`width="${width}"`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ text
|
||||
|
||||
expectSameDom(
|
||||
output,
|
||||
'<p><img src="http://imageUrl" data-origin="http://imageUrl" alt="alt text" width="50" height="50" /></p>'
|
||||
'<p><img src="http://imageUrl" data-origin="http://imageUrl" alt="alt text" width="50" /></p>'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user