mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00: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:
parent
a117b2aeb1
commit
9ff4d06773
@ -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>'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user