Reimplement MD034/no-bare-urls using micromark tokens (fixes #707).

This commit is contained in:
David Anson 2023-02-05 16:58:06 -08:00
parent 64159fa456
commit b990b3ea77
22 changed files with 1495 additions and 947 deletions

28
test/bare-urls-in-html.md Normal file
View file

@ -0,0 +1,28 @@
# Bare URLs in HTML
<p>
https://example.com/pass
</p>
Text https://example.com/fail text. {MD034}
Text <code>https://example.com/pass</code> text.
Text <code>https://example.com/pass</code> text https://example.com/fail text. {MD034}
Text <code>https://example.com/pass</code> text https://example.com/fail text <code>https://example.com/pass</code> text. {MD034}
Text <em> text <strong>text</strong> https://example.com/pass </em> text.
Text <em> text <em>text</em> https://example.com/pass </em> text.
Text <em> text <em>text</em> text </em> https://example.com/fail text. {MD034}
Text <br> text https://example.com/fail <br> text. {MD034}
Text <br/> text https://example.com/fail <br/> text. {MD034}
<!-- markdownlint-configure-file {
"line-length": false,
"no-inline-html": false
} -->

View file

@ -70,3 +70,9 @@ 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>
Links with spaces inside angle brackets are okay: [blue jay](<https://en.wikipedia.org/wiki/Blue jay>)
Email addresses are treated similarly: user@example.com {MD034}
Angle brackets work the same for email: <user@example.com>

View file

@ -10,6 +10,7 @@ Every Markdown Syntax
Text *emphasized* **strong** ___emphasized+strong___.
Text `code` <strike>html</strike> <https://example.com/page>.
Text [link](https://example.com/page) [link][] [link] ![image][link].
Text https://example.com/page.
Hard
line break

View file

@ -116,3 +116,10 @@ Text
<details>
{MD033:116}
<custom-element attribute1="value1"
attribute2="value2" />
{MD033:120}
Text <!-- <commented-out html="tag"> --> text.

View file

@ -8,8 +8,6 @@ https://www.google.com/ {MD034}
hTtPs://gOoGlE.cOm/ {MD034}
ftp://user:password@ftp-server.example.com/dir/file.txt {MD034}
This link should be fine: <https://www.google.com/>
The following are allowed to avoid conflicts with MD011/no-reversed-links:
@ -17,13 +15,6 @@ The following are allowed to avoid conflicts with MD011/no-reversed-links:
[https://example.com]
[https://example.com/search?query=text]
The following are allowed to avoid conflicts with HTML-like syntax:
"https://example.com"
"https://example.com/search?query=text"
'https://example.com'
'https://example.com/search?query=text'
Other enclosures are not allowed:
(https://example.com) {MD034}

View file

@ -139,7 +139,30 @@ test("https://github.com/dotnet/docs", (t) => {
const rootDir = "./test-repos/dotnet-docs";
const globPatterns = [ join(rootDir, "**/*.md") ];
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
return lintTestRepo(t, globPatterns, configPath);
const ignoreRes = [
/^test-repos\/dotnet-docs\/docs\/core\/diagnostics\/dotnet-symbol\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/core\/install\/linux-package-mixup\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/core\/porting\/third-party-deps\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/configure-apps\/file-schema\/wcf\/issuedtokenparameters\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/configure-apps\/file-schema\/wcf\/servicemetadata\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/configure-apps\/file-schema\/wcf\/userprincipalname\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/extending\/how-to-compare-claims\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/extending\/overriding-the-identity-of-a-service-for-authentication\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/feature-details\/managing-claims-and-authorization-with-the-identity-model\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/feature-details\/message-filters\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/feature-details\/stand-alone-json-serialization\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/feature-details\/wcf-security-terminology\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/feature-details\/xml-and-ado-net-types-in-data-contracts\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/privacy-information\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/samples\/custom-channel-dispatcher\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/samples\/security-validation\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/wcf\/service-versioning\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/framework\/whats-new\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/orleans\/tutorials-and-samples\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/standard\/base-types\/regular-expression-source-generators\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/dotnet-docs\/docs\/standard\/serialization\/xml-schema-def-tool-gen\.md: \d+: MD034\/.*$\r?\n?/gm
];
return lintTestRepo(t, globPatterns, configPath, ignoreRes);
});
test("https://github.com/electron/electron", (t) => {
@ -160,7 +183,10 @@ test("https://github.com/eslint/eslint", (t) => {
const rootDir = "./test-repos/eslint-eslint";
const globPatterns = [ join(rootDir, "docs/**/*.md") ];
const configPath = join(rootDir, ".markdownlint.yml");
const ignoreRes = [ /^[^:]+: \d+: MD051\/.*$\r?\n?/gm ];
const ignoreRes = [
/^[^:]+: \d+: MD051\/.*$\r?\n?/gm,
/^test-repos\/eslint-eslint\/docs\/src\/library\/link-card\.md: \d+: MD034\/.*$\r?\n?/gm
];
return lintTestRepo(t, globPatterns, configPath, ignoreRes);
});
@ -168,7 +194,44 @@ test("https://github.com/mdn/content", (t) => {
const rootDir = "./test-repos/mdn-content";
const globPatterns = [ join(rootDir, "**/*.md") ];
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
return lintTestRepo(t, globPatterns, configPath);
const ignoreRes = [
/^test-repos\/mdn-content\/files\/en-us\/games\/techniques\/3d_on_the_web\/building_up_a_basic_demo_with_a-frame\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/techniques\/3d_on_the_web\/building_up_a_basic_demo_with_babylon.js\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/techniques\/3d_on_the_web\/building_up_a_basic_demo_with_playcanvas\/engine\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/techniques\/3d_on_the_web\/building_up_a_basic_demo_with_three.js\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/animations_and_tweens\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/bounce_off_the_walls\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/build_the_brick_field\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/buttons\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/collision_detection\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/extra_lives\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/game_over\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/initialize_the_framework\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/load_the_assets_and_print_them_on_screen\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/move_the_ball\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/physics\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/player_paddle_and_controls\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/randomizing_gameplay\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/scaling\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/the_score\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_phaser\/win_the_game\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/bounce_off_the_walls\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/build_the_brick_field\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/collision_detection\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/create_the_canvas_and_draw_on_it\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/finishing_up\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/game_over\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/mouse_controls\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/move_the_ball\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/paddle_and_keyboard_controls\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/games\/tutorials\/2d_breakout_game_pure_javascript\/track_the_score_and_win\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/learn\/server-side\/apache_configuration_htaccess\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/mozilla\/add-ons\/webextensions\/manifest.json\/content_security_policy\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/web\/api\/window\/window\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/web\/html\/element\/input\/email\/index\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mdn-content\/files\/en-us\/web\/http\/headers\/www-authenticate\/index\.md: \d+: MD034\/.*$\r?\n?/gm
];
return lintTestRepo(t, globPatterns, configPath, ignoreRes);
});
test("https://github.com/mdn/translated-content", (t) => {
@ -211,6 +274,7 @@ test("https://github.com/mochajs/mocha", (t) => {
const configPath = join(rootDir, ".markdownlint.json");
const ignoreRes = [
/^[^:]+: \d+: MD051\/.*$\r?\n?/gm,
/^test-repos\/mochajs-mocha\/\.github\/CODE_OF_CONDUCT\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/mochajs-mocha\/docs\/index\.md: \d+: MD053\/.*$\r?\n?/gm
];
return lintTestRepo(t, globPatterns, configPath, ignoreRes);
@ -220,14 +284,23 @@ test("https://github.com/pi-hole/docs", (t) => {
const rootDir = "./test-repos/pi-hole-docs";
const globPatterns = [ join(rootDir, "**/*.md") ];
const configPath = join(rootDir, ".markdownlint.json");
return lintTestRepo(t, globPatterns, configPath);
const ignoreRes = [ /^test-repos\/pi-hole-docs\/docs\/guides\/vpn\/wireguard\/route-everything\.md: \d+: MD034\/.*$\r?\n?/gm ];
return lintTestRepo(t, globPatterns, configPath, ignoreRes);
});
test("https://github.com/v8/v8.dev", (t) => {
const rootDir = "./test-repos/v8-v8-dev";
const globPatterns = [ join(rootDir, "src/**/*.md") ];
const configPath = join(rootDir, ".markdownlint.json");
const ignoreRes = [ /^[^:]+: \d+: MD033\/.*\[Element: feature-support\].*$\r?\n?/gm ];
const ignoreRes = [
/^[^:]+: \d+: MD033\/.*\[Element: feature-support\].*$\r?\n?/gm,
/^test-repos\/v8-v8-dev\/src\/docs\/become-committer\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/v8-v8-dev\/src\/docs\/design-review-guidelines\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/v8-v8-dev\/src\/docs\/feature-launch-process\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/v8-v8-dev\/src\/docs\/official-support\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/v8-v8-dev\/src\/features\/import-assertions\.md: \d+: MD034\/.*$\r?\n?/gm,
/^test-repos\/v8-v8-dev\/src\/features\/private-brand-checks\.md: \d+: MD034\/.*$\r?\n?/gm
];
return lintTestRepo(t, globPatterns, configPath, ignoreRes);
});

View file

@ -183,7 +183,7 @@ https://example.com/multi-line-label
[unique8]: https://example.com/unique8
[unique9]: https://example.com/unique9
[unique10]: https://example.com/unique10
[^1]: https://example.com/footnote
[^1]: https://example.com/footnote {MD034}
## Ignored Labels

File diff suppressed because it is too large Load diff

View file

@ -2800,6 +2800,164 @@ Generated by [AVA](https://avajs.dev).
`,
}
## bare-urls-in-html.md
> Snapshot 1
{
errors: [
{
errorContext: 'https://example.com/fail',
errorDetail: null,
errorRange: [
6,
24,
],
fixInfo: {
deleteCount: 24,
editColumn: 6,
insertText: '<https://example.com/fail>',
},
lineNumber: 7,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: 'https://example.com/fail',
errorDetail: null,
errorRange: [
49,
24,
],
fixInfo: {
deleteCount: 24,
editColumn: 49,
insertText: '<https://example.com/fail>',
},
lineNumber: 11,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: 'https://example.com/fail',
errorDetail: null,
errorRange: [
49,
24,
],
fixInfo: {
deleteCount: 24,
editColumn: 49,
insertText: '<https://example.com/fail>',
},
lineNumber: 13,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: 'https://example.com/fail',
errorDetail: null,
errorRange: [
41,
24,
],
fixInfo: {
deleteCount: 24,
editColumn: 41,
insertText: '<https://example.com/fail>',
},
lineNumber: 19,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: 'https://example.com/fail',
errorDetail: null,
errorRange: [
16,
24,
],
fixInfo: {
deleteCount: 24,
editColumn: 16,
insertText: '<https://example.com/fail>',
},
lineNumber: 21,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: 'https://example.com/fail',
errorDetail: null,
errorRange: [
17,
24,
],
fixInfo: {
deleteCount: 24,
editColumn: 17,
insertText: '<https://example.com/fail>',
},
lineNumber: 23,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
],
fixed: `# Bare URLs in HTML␊
<p>
https://example.com/pass␊
</p>
Text <https://example.com/fail> text. {MD034}␊
Text <code>https://example.com/pass</code> text.␊
Text <code>https://example.com/pass</code> text <https://example.com/fail> text. {MD034}␊
Text <code>https://example.com/pass</code> text <https://example.com/fail> text <code>https://example.com/pass</code> text. {MD034}␊
Text <em> text <strong>text</strong> https://example.com/pass </em> text.␊
Text <em> text <em>text</em> https://example.com/pass </em> text.␊
Text <em> text <em>text</em> text </em> <https://example.com/fail> text. {MD034}␊
Text <br> text <https://example.com/fail> <br> text. {MD034}␊
Text <br/> text <https://example.com/fail> <br/> text. {MD034}␊
<!-- markdownlint-configure-file {␊
"line-length": false,␊
"no-inline-html": false␊
} -->␊
`,
}
## bare-urls.md
> Snapshot 1
@ -2986,6 +3144,26 @@ Generated by [AVA](https://avajs.dev).
'no-bare-urls',
],
},
{
errorContext: 'user@example.com',
errorDetail: null,
errorRange: [
40,
16,
],
fixInfo: {
deleteCount: 16,
editColumn: 40,
insertText: '<user@example.com>',
},
lineNumber: 76,
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␊
@ -3059,6 +3237,12 @@ Generated by [AVA](https://avajs.dev).
... when explicit: <https://example.com#heading->
... when embedded: <code>https://example.com#heading-</code>
Links with spaces inside angle brackets are okay: [blue jay](<https://en.wikipedia.org/wiki/Blue jay>)␊
Email addresses are treated similarly: <user@example.com> {MD034}␊
Angle brackets work the same for email: <user@example.com>
`,
}
@ -10256,6 +10440,7 @@ Generated by [AVA](https://avajs.dev).
Text *emphasized* **strong** ___emphasized+strong___.␊
Text \`code\` <strike>html</strike> <https://example.com/page>.␊
Text [link](https://example.com/page) [link][] [link] ![image][link].␊
Text https://example.com/page.␊
Hard ␊
line break␊
@ -16679,6 +16864,22 @@ Generated by [AVA](https://avajs.dev).
'no-inline-html',
],
},
{
errorContext: null,
errorDetail: 'Element: custom-element',
errorRange: [
1,
35,
],
fixInfo: null,
lineNumber: 120,
ruleDescription: 'Inline HTML',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md033.md',
ruleNames: [
'MD033',
'no-inline-html',
],
},
],
fixed: `# Detailed HTML Results␊
@ -16798,6 +16999,13 @@ Generated by [AVA](https://avajs.dev).
<details>
{MD033:116}␊
<custom-element attribute1="value1"
attribute2="value2" />␊
{MD033:120}␊
Text <!-- <commented-out html="tag"> --> text.␊
`,
}
@ -22836,26 +23044,6 @@ Generated by [AVA](https://avajs.dev).
'no-bare-urls',
],
},
{
errorContext: 'ftp://user:password@ftp-server...',
errorDetail: null,
errorRange: [
1,
55,
],
fixInfo: {
deleteCount: 55,
editColumn: 1,
insertText: '<ftp://user:password@ftp-server.example.com/dir/file.txt>',
},
lineNumber: 11,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: 'https://example.com',
errorDetail: null,
@ -22868,7 +23056,7 @@ Generated by [AVA](https://avajs.dev).
editColumn: 2,
insertText: '<https://example.com>',
},
lineNumber: 29,
lineNumber: 20,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -22877,18 +23065,18 @@ Generated by [AVA](https://avajs.dev).
],
},
{
errorContext: 'https://example.com',
errorContext: 'https://example.com}',
errorDetail: null,
errorRange: [
2,
19,
20,
],
fixInfo: {
deleteCount: 19,
deleteCount: 20,
editColumn: 2,
insertText: '<https://example.com>',
insertText: '<https://example.com}>',
},
lineNumber: 30,
lineNumber: 21,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -22908,7 +23096,7 @@ Generated by [AVA](https://avajs.dev).
editColumn: 3,
insertText: '<https://example.com/>',
},
lineNumber: 36,
lineNumber: 27,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -22928,7 +23116,7 @@ Generated by [AVA](https://avajs.dev).
editColumn: 26,
insertText: '<https://example.com/>',
},
lineNumber: 36,
lineNumber: 27,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
@ -22947,8 +23135,6 @@ Generated by [AVA](https://avajs.dev).
<hTtPs://gOoGlE.cOm/> {MD034}␊
<ftp://user:password@ftp-server.example.com/dir/file.txt> {MD034}␊
This link should be fine: <https://www.google.com/>
The following are allowed to avoid conflicts with MD011/no-reversed-links:␊
@ -22956,17 +23142,10 @@ Generated by [AVA](https://avajs.dev).
[https://example.com]␊
[https://example.com/search?query=text]␊
The following are allowed to avoid conflicts with HTML-like syntax:␊
"https://example.com"␊
"https://example.com/search?query=text"␊
'https://example.com'␊
'https://example.com/search?query=text'␊
Other enclosures are not allowed:␊
(<https://example.com>) {MD034}␊
{<https://example.com>} {MD034}␊
{<https://example.com}> {MD034}␊
Duplicate links in tables should be handled:␊
@ -35200,6 +35379,26 @@ Generated by [AVA](https://avajs.dev).
{
errors: [
{
errorContext: 'https://example.com/footnote',
errorDetail: null,
errorRange: [
7,
28,
],
fixInfo: {
deleteCount: 28,
editColumn: 7,
insertText: '<https://example.com/footnote>',
},
lineNumber: 186,
ruleDescription: 'Bare URL used',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md034.md',
ruleNames: [
'MD034',
'no-bare-urls',
],
},
{
errorContext: '[text][missing]',
errorDetail: 'Missing link or image reference definition: "missing"',
@ -35600,7 +35799,7 @@ Generated by [AVA](https://avajs.dev).
[unique8]: https://example.com/unique8␊
[unique9]: https://example.com/unique9␊
[unique10]: https://example.com/unique10␊
[^1]: https://example.com/footnote
[^1]: <https://example.com/footnote> {MD034}
## Ignored Labels␊