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:
mau-jac
2020-05-18 07:12:59 -04:00
committed by GitHub
parent a117b2aeb1
commit 9ff4d06773
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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}"`);
}
}
+1 -1
View File
@@ -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>'
);
});
});