Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ff4d06

Browse files
authored
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
1 parenta117b2a commit9ff4d06

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/core/render/compiler/image.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const imageCompiler = ({ renderer, contentBase, router }) =>
2222
if(height){
2323
attrs.push(`width="${width}" height="${height}"`);
2424
}else{
25-
attrs.push(`width="${width}" height="${width}"`);
25+
attrs.push(`width="${width}"`);
2626
}
2727
}
2828

‎test/unit/render.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ text
168168

169169
expectSameDom(
170170
output,
171-
'<p><img src="http://imageUrl" data-origin="http://imageUrl" alt="alt text" width="50"height="50"/></p>'
171+
'<p><img src="http://imageUrl" data-origin="http://imageUrl" alt="alt text" width="50" /></p>'
172172
);
173173
});
174174
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp