mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
18 lines
461 B
JavaScript
18 lines
461 B
JavaScript
// @ts-check
|
|
|
|
"use strict";
|
|
|
|
const shared = require("./shared");
|
|
|
|
module.exports = {
|
|
"names": [ "MD045", "no-alt-text" ],
|
|
"description": "Images should have alternate text (alt text)",
|
|
"tags": [ "accessibility", "images" ],
|
|
"function": function MD045(params, onError) {
|
|
shared.forEachInlineChild(params, "image", function forToken(token) {
|
|
if (token.content === "") {
|
|
shared.addError(onError, token.lineNumber);
|
|
}
|
|
});
|
|
}
|
|
};
|