Skip to content

Commit b88f6ec

Browse files
committed
Remove unneccessary attributes cleanup
1 parent 5404439 commit b88f6ec

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/remark-image-resize.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ export default function remarkImageResize() {
3838
name: 'alt',
3939
value: cleanedAlt,
4040
};
41-
// remove any pre-existing width/height attributes to avoid duplicates
42-
node.attributes = node.attributes.filter(
43-
a => !(a && (a.name === 'width' || a.name === 'height'))
44-
);
41+
4542
if (wStr)
4643
node.attributes.push({type: 'mdxJsxAttribute', name: 'width', value: wStr});
4744
if (hStr)

0 commit comments

Comments
 (0)