Skip to content

Commit

Permalink
Add alt text to unrelated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed Oct 5, 2023
1 parent 6482958 commit 9f47b66
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 77 deletions.
2 changes: 1 addition & 1 deletion test/h1-image-as-top-level-heading.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center"><img src="https://placekitten.com/300/150"/></h1> {MD045}
<h1 align="center"><img alt="Cats" src="https://placekitten.com/300/150"/></h1>

Text

Expand Down
2 changes: 1 addition & 1 deletion test/html-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Text ``text <em> text`` text
Text

Text <a href="#anchor">inline {MD033}</a> text
text <img src="src.png"/> text {MD033}{MD045}
text <img alt="Description" src="src.png"/> text {MD033}

Text

Expand Down
2 changes: 1 addition & 1 deletion test/proper-names-no-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bad text javascript. {MD044}

Bad code `javascript`. {MD044}

<img src="img/javascript/image.png"> {MD045}
<img alt="Description" src="img/javascript/image.png">

<script type="text/javascript">
javascript {MD044}
Expand Down
2 changes: 1 addition & 1 deletion test/proper-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Text referencing MultipleCase name.
Text referencing MULTIPLECASE name. {MD044}
Text referencing mULTIPLEcASE name.

<img src="img/javascript/image.png" error="{MD044}"> {MD045}
<img alt="Description" src="img/javascript/image.png" error="{MD044}">

<script type="text/javascript">
{MD044:94}
Expand Down
81 changes: 8 additions & 73 deletions test/snapshots/markdownlint-test-scenarios.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -13931,25 +13931,8 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

{
errors: [
{
errorContext: null,
errorDetail: 'Element: img',
errorRange: [
20,
44,
],
fixInfo: null,
lineNumber: 1,
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: `<h1 align="center"><img src="https://placekitten.com/300/150"/></h1> {MD045}␊
errors: [],
fixed: `<h1 align="center"><img alt="Cats" src="https://placekitten.com/300/150"/></h1>␊
Text␊
Expand Down Expand Up @@ -18682,7 +18665,7 @@ Generated by [AVA](https://avajs.dev).
errorDetail: 'Element: img',
errorRange: [
6,
20,
38,
],
fixInfo: null,
lineNumber: 91,
Expand Down Expand Up @@ -18757,22 +18740,6 @@ Generated by [AVA](https://avajs.dev).
'no-inline-html',
],
},
{
errorContext: null,
errorDetail: 'Element: img',
errorRange: [
6,
20,
],
fixInfo: null,
lineNumber: 91,
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: `# Detailed HTML Results␊
Expand Down Expand Up @@ -18864,7 +18831,7 @@ Generated by [AVA](https://avajs.dev).
Text␊
Text <a href="#anchor">inline {MD033}</a> text␊
text <img src="src.png"/> text {MD033}{MD045}␊
text <img alt="Description" src="src.png"/> text {MD033}␊
Text␊
Expand Down Expand Up @@ -37271,22 +37238,6 @@ Generated by [AVA](https://avajs.dev).
'proper-names',
],
},
{
errorContext: null,
errorDetail: 'Element: img',
errorRange: [
1,
36,
],
fixInfo: null,
lineNumber: 9,
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: `# Proper Names No HTML␊
Expand All @@ -37296,7 +37247,7 @@ Generated by [AVA](https://avajs.dev).
Bad code \`JavaScript\`. {MD044}␊
<img src="img/javascript/image.png"> {MD045}
<img alt="Description" src="img/javascript/image.png">␊
<script type="text/javascript">␊
JavaScript {MD044}␊
Expand Down Expand Up @@ -38542,12 +38493,12 @@ Generated by [AVA](https://avajs.dev).
errorContext: null,
errorDetail: 'Expected: JavaScript; Actual: javascript',
errorRange: [
15,
33,
10,
],
fixInfo: {
deleteCount: 10,
editColumn: 15,
editColumn: 33,
insertText: 'JavaScript',
},
lineNumber: 92,
Expand Down Expand Up @@ -38778,22 +38729,6 @@ Generated by [AVA](https://avajs.dev).
'proper-names',
],
},
{
errorContext: null,
errorDetail: 'Element: img',
errorRange: [
1,
52,
],
fixInfo: null,
lineNumber: 92,
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',
],
},
{
errorContext: null,
errorDetail: 'Expected: indented; Actual: fenced',
Expand Down Expand Up @@ -38899,7 +38834,7 @@ Generated by [AVA](https://avajs.dev).
Text referencing multiplecase name. {MD044}␊
Text referencing mULTIPLEcASE name.␊
<img src="img/JavaScript/image.png" error="{MD044}"> {MD045}
<img alt="Description" src="img/JavaScript/image.png" error="{MD044}">␊
<script type="text/JavaScript">␊
{MD044:94}␊
Expand Down
Binary file modified test/snapshots/markdownlint-test-scenarios.js.snap
Binary file not shown.

0 comments on commit 9f47b66

Please sign in to comment.