add additional test for reference syntax of images (fixes #75)

This commit is contained in:
Duncan Mackenzie 2018-01-02 14:12:34 -08:00
parent d3b0e1eea2
commit ae443f02ad
3 changed files with 15 additions and 2 deletions

View file

@ -1206,7 +1206,7 @@ module.exports = [
{ {
"name": "MD045", "name": "MD045",
"desc": "Images should have ALT Text attribute", "desc": "Images should have ALT Text attribute",
"tags": [ "images", "accessibility" ], "tags": [ "accessibility", "images" ],
"aliases": [ "no-alt-text" ], "aliases": [ "no-alt-text" ],
"regexp": null, "regexp": null,
"func": function MD045(params, errors) { "func": function MD045(params, errors) {

View file

@ -19,3 +19,7 @@ A [normal](link) and an [empty one]() and a [fragment](#one).
An image without alt text ![](image.jpg) An image without alt text ![](image.jpg)
![](image.jpg) ![](image.jpg)
A reference image without alt text ![][reference]
[reference]: image.jpg "title"

View file

@ -45,7 +45,7 @@
"errorRange": [25, 13] "errorRange": [25, 13]
}, },
{ {
"lineNumber": 22, "lineNumber": 25,
"ruleName": "MD043", "ruleName": "MD043",
"ruleAlias": "required-headers", "ruleAlias": "required-headers",
"ruleDescription": "Required header structure", "ruleDescription": "Required header structure",
@ -97,5 +97,14 @@
"errorDetail": null, "errorDetail": null,
"errorContext": null, "errorContext": null,
"errorRange": null "errorRange": null
},
{
"lineNumber": 23,
"ruleName": "MD045",
"ruleAlias": "no-alt-text",
"ruleDescription": "Images should have ALT Text attribute",
"errorDetail": null,
"errorContext": null,
"errorRange": null
} }
] ]