Skip to content

Commit e725906

Browse files
khiga8iansan5653
andauthored
Update src/rules/no-empty-string-alt.js
Co-authored-by: Ian Sanders <[email protected]>
1 parent 88e1852 commit e725906

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/no-empty-string-alt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
token.children.some((child) => child.type === "image"),
2323
);
2424

25-
const htmlAltRegex = new RegExp(/alt=""|alt=''/, "gid");
25+
const htmlAltRegex = /alt=['"]['"]/gid;
2626
const markdownAltRegex = new RegExp(/!\[""\]|!\[''\]/, "gid");
2727

2828
for (const token of [...htmlTagsWithImages, ...inlineImages]) {

0 commit comments

Comments
 (0)