diff --git a/lib/md045.js b/lib/md045.js index 3590c9826..7f875fc9b 100644 --- a/lib/md045.js +++ b/lib/md045.js @@ -32,8 +32,8 @@ module.exports = { const html = filterByTypes(params.parsers.micromark.tokens, [ "htmlText" ]); for (const token of html) { const htmlTagInfo = getHtmlTagInfo(token); - if (htmlTagInfo && htmlTagInfo.name === "img") { - const hasAltAttribute = new RegExp(/alt=/); + if (htmlTagInfo && htmlTagInfo.name.toLowerCase() === "img") { + const hasAltAttribute = new RegExp(/alt=/i); if (!hasAltAttribute.test(token.text)) { const range = [ token.startColumn,