Update MD034/no-bare-urls to scan all tokens when pruning HTML content so open/close pairs with different parents are handled (fixes #966).

This commit is contained in:
David Anson 2023-09-13 22:44:15 -07:00
parent de5fa400e7
commit daec896b8d
5 changed files with 100 additions and 60 deletions

View file

@ -59,6 +59,26 @@ https://example.com
<pre>https://example.com</pre>
</p>
<div>
https://example.com
</div>
<div>
https://example.com
</div>
<div>
https://example.com
</div>
<div>
https://example.com
</div>
URLs in link and image text are not bare:
Text [link to https://example.com site](https://example.com) text.

View file

@ -3526,7 +3526,7 @@ Generated by [AVA](https://avajs.dev).
editColumn: 27,
insertText: '<https://example.com#heading->',
},
lineNumber: 68,
lineNumber: 88,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -3546,7 +3546,7 @@ Generated by [AVA](https://avajs.dev).
editColumn: 40,
insertText: '<user@example.com>',
},
lineNumber: 76,
lineNumber: 96,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -3566,7 +3566,7 @@ Generated by [AVA](https://avajs.dev).
editColumn: 59,
insertText: '<https://example.com>',
},
lineNumber: 84,
lineNumber: 104,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -3636,6 +3636,26 @@ Generated by [AVA](https://avajs.dev).
<pre>https://example.com</pre>
</p>
<div>
https://example.com␊
</div>
<div>
https://example.com␊
</div>
<div>
https://example.com␊
</div>
<div>
https://example.com␊
</div>
URLs in link and image text are not bare:␊
Text [link to https://example.com site](https://example.com) text.␊