mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD034/no-bare-urls to handle more scenarios, simplify slightly, replace blanket MD034 suppression for https://github.com/mdn/content with specific (valid) issues (refs #607).
This commit is contained in:
parent
2e2937081e
commit
d352d4ece1
6 changed files with 103 additions and 18 deletions
|
|
@ -2966,6 +2966,26 @@ Generated by [AVA](https://avajs.dev).
|
|||
'no-bare-urls',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: 'https://example.com#heading-',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
27,
|
||||
28,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 28,
|
||||
editColumn: 27,
|
||||
insertText: '<https://example.com#heading->',
|
||||
},
|
||||
lineNumber: 68,
|
||||
ruleDescription: 'Bare URL used',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
|
||||
ruleNames: [
|
||||
'MD034',
|
||||
'no-bare-urls',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Detailed Results Bare URLs␊
|
||||
␊
|
||||
|
|
@ -3001,7 +3021,11 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
This is not a bare [link]( https://example.com ).␊
|
||||
␊
|
||||
URLs in HTML are not bare:␊
|
||||
Nor is [link](https://example.com/path-with(parens)).␊
|
||||
␊
|
||||
Or <https://example.com/path-with(parens)>.␊
|
||||
␊
|
||||
URLs in HTML attributes are not bare:␊
|
||||
␊
|
||||
<element-name first-attribute=" https://example.com/first " second-attribute=" https://example.com/second ">␊
|
||||
Text␊
|
||||
|
|
@ -3011,11 +3035,30 @@ Generated by [AVA](https://avajs.dev).
|
|||
first-attribute=" https://example.com/first "␊
|
||||
second-attribute=" https://example.com/second "></element-name>␊
|
||||
␊
|
||||
URLs surrounded by HTML tags are not bare:␊
|
||||
␊
|
||||
Not <code>https://example.com</code> bare.␊
|
||||
␊
|
||||
Not <pre>https://example.com</pre> bare.␊
|
||||
␊
|
||||
<p>␊
|
||||
Not bare due to being in an HTML block:␊
|
||||
https://example.com␊
|
||||
<code>https://example.com</code>␊
|
||||
<pre>https://example.com</pre>␊
|
||||
</p>␊
|
||||
␊
|
||||
URLs in link and image text are not bare:␊
|
||||
␊
|
||||
Text [link to https://example.com site](https://example.com) text.␊
|
||||
␊
|
||||
Image  text.␊
|
||||
␊
|
||||
URLs may end with a dash: <https://example.com#heading-> {MD034}␊
|
||||
␊
|
||||
... when explicit: <https://example.com#heading->␊
|
||||
␊
|
||||
... when embedded: <code>https://example.com#heading-</code>␊
|
||||
`,
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue