Skip to content

Commit

Permalink
This file got updated when running npm run ci
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed Oct 5, 2023
1 parent 4b42701 commit c3ebe1f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion demo/markdownlint-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5947,7 +5947,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
var _require = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"),
addError = _require.addError;
var _require2 = __webpack_require__(/*! ../helpers/micromark.cjs */ "../helpers/micromark.cjs"),
filterByTypes = _require2.filterByTypes;
filterByTypes = _require2.filterByTypes,
getHtmlTagInfo = _require2.getHtmlTagInfo;
var nextLinesRe = /[\r\n][\s\S]*$/;
module.exports = {
"names": ["MD045", "no-alt-text"],
"description": "Images should have alternate text (alt text)",
Expand All @@ -5972,6 +5974,26 @@ module.exports = {
} finally {
_iterator.f();
}
var html = filterByTypes(params.parsers.micromark.tokens, ["htmlText"]);
var _iterator2 = _createForOfIteratorHelper(html),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var token = _step2.value;
var htmlTagInfo = getHtmlTagInfo(token);
if (htmlTagInfo && htmlTagInfo.name.toLowerCase() === "img") {
var hasAltAttribute = new RegExp(/alt=/i);
if (!hasAltAttribute.test(token.text)) {
var _range = [token.startColumn, token.text.replace(nextLinesRe, "").length];
addError(onError, token.startLine, "Element: " + htmlTagInfo.name, undefined, _range);
}
}
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
}
};

Expand Down

0 comments on commit c3ebe1f

Please sign in to comment.