Skip to content

Commit

Permalink
Case insensitive comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed Oct 5, 2023
1 parent de8a048 commit 4100372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/md045.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4100372

Please sign in to comment.