mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-04 06:58:49 +01:00
Reimplement MD045/no-alt-text using micromark tokens, add range information.
This commit is contained in:
parent
3dedc1cda1
commit
e8cc7eb3cb
6 changed files with 98 additions and 19 deletions
|
|
@ -22,5 +22,11 @@ Link to image with alternate text [](image.jpg)
|
|||
|
||||
Link to image without alternate text [](image.jpg) {MD045}
|
||||
|
||||
Multi-line image with alternate text 
|
||||
|
||||
Multi-line image without alternate text  {MD045:28}
|
||||
|
||||
[notitle]: image.jpg
|
||||
[title]: image.jpg "Title"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1860,7 +1860,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
33,
|
||||
14,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 19,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -6741,7 +6744,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
1,
|
||||
14,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 85,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33064,7 +33070,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
1,
|
||||
14,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33077,7 +33086,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
1,
|
||||
22,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 9,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33090,7 +33102,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
30,
|
||||
14,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 11,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33103,7 +33118,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
40,
|
||||
12,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 15,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33116,7 +33134,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
50,
|
||||
10,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 19,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33129,7 +33150,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
errorRange: [
|
||||
39,
|
||||
14,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 23,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
|
|
@ -33139,6 +33163,19 @@ Generated by [AVA](https://avajs.dev).
|
|||
'no-alt-text',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: null,
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 28,
|
||||
ruleDescription: 'Images should have alternate text (alt text)',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md045.md',
|
||||
ruleNames: [
|
||||
'MD045',
|
||||
'no-alt-text',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Images with and without alternate text␊
|
||||
␊
|
||||
|
|
@ -33164,6 +33201,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Link to image without alternate text [](image.jpg) {MD045}␊
|
||||
␊
|
||||
Multi-line image with alternate text ␊
|
||||
␊
|
||||
Multi-line image without alternate text  {MD045:28}␊
|
||||
␊
|
||||
[notitle]: image.jpg␊
|
||||
[title]: image.jpg "Title"␊
|
||||
`,
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue