mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 05:50:13 +01:00
Update MD054/link-image-style to handle autolinked email addresses when disallowed (fixes #1391).
This commit is contained in:
parent
3b07268aeb
commit
a7a50eaa39
16 changed files with 858 additions and 4 deletions
|
|
@ -6721,9 +6721,9 @@ module.exports = {
|
|||
let isError = false;
|
||||
if (type === "autolink") {
|
||||
// link kind is an autolink
|
||||
destination = getDescendantsByType(link, [ "autolinkProtocol" ])[0].text;
|
||||
destination = getDescendantsByType(link, [ [ "autolinkEmail", "autolinkProtocol" ] ])[0]?.text;
|
||||
label = destination;
|
||||
isError = !autolink;
|
||||
isError = !autolink && Boolean(destination);
|
||||
} else {
|
||||
// link type is "image" or "link"
|
||||
label = getDescendantsByType(link, [ "label", "labelText" ])[0].text;
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ module.exports = {
|
|||
let isError = false;
|
||||
if (type === "autolink") {
|
||||
// link kind is an autolink
|
||||
destination = getDescendantsByType(link, [ "autolinkProtocol" ])[0].text;
|
||||
destination = getDescendantsByType(link, [ [ "autolinkEmail", "autolinkProtocol" ] ])[0]?.text;
|
||||
label = destination;
|
||||
isError = !autolink;
|
||||
isError = !autolink && Boolean(destination);
|
||||
} else {
|
||||
// link type is "image" or "link"
|
||||
label = getDescendantsByType(link, [ "label", "labelText" ])[0].text;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text {MD054}
|
||||
|
||||
Text [email][] text {MD054}
|
||||
|
||||
Text [email] text {MD054}
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-reference-definitions": false,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text
|
||||
|
||||
Text <user@example.com> text
|
||||
|
||||
Text [user@example.com](user@example.com) text
|
||||
|
||||
Text [user@example.com][email] text {MD054}
|
||||
|
||||
Text [email][] text {MD054}
|
||||
|
||||
Text [email] text {MD054}
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-reference-definitions": false,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text
|
||||
|
||||
Text [email][] text
|
||||
|
||||
Text [email] text
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text {MD054}
|
||||
|
||||
Text [email][] text
|
||||
|
||||
Text [email] text {MD054}
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text
|
||||
|
||||
Text [email][] text {MD054}
|
||||
|
||||
Text [email] text {MD054}
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com)
|
||||
|
||||
Text [user@example.com][email] text {MD054}
|
||||
|
||||
Text [email][] text {MD054}
|
||||
|
||||
Text [email] text {MD054}
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-reference-definitions": false,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text
|
||||
|
||||
Text [user@example.com][email] text
|
||||
|
||||
Text [email][] text
|
||||
|
||||
Text [email] text
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,18 @@ Text ![url] text
|
|||
|
||||
Text [file.md](file.md) text
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text
|
||||
|
||||
Text [user@example.com][email] text
|
||||
|
||||
Text [email][] text
|
||||
|
||||
Text [email] text
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
|
|
|
|||
|
|
@ -47,6 +47,19 @@ Text ![url] text
|
|||
|
||||
Text [file.md](file.md) text
|
||||
|
||||
Text <user@example.com> text
|
||||
|
||||
Text [user@example.com](user@example.com) text
|
||||
(allowed by !url_inline because email address is not an absolute URL)
|
||||
|
||||
Text [user@example.com][email] text
|
||||
|
||||
Text [email][] text
|
||||
|
||||
Text [email] text
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-image-style": {
|
||||
"url_inline": false
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text {MD054}
|
||||
|
||||
Text [email][] text {MD054}
|
||||
|
||||
Text [email] text {MD054}
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-reference-definitions": false,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text
|
||||
|
||||
Text [email][] text
|
||||
|
||||
Text [email] text
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Text <https://example.com/pa)re(ns> text {MD054}
|
|||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
Text <user@example.com> text {MD054}
|
||||
|
||||
Text [user@example.com](user@example.com) text {MD054}
|
||||
|
||||
Text [user@example.com][email] text {MD054}
|
||||
|
||||
Text [email][] text {MD054}
|
||||
|
||||
Text [email] text
|
||||
|
||||
[email]: user@example.com
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
|
|
|
|||
|
|
@ -26098,6 +26098,70 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com][email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
25,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email][]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
9,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 77,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
7,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 79,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Autolink Only␊
|
||||
␊
|
||||
|
|
@ -26169,6 +26233,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text {MD054}␊
|
||||
␊
|
||||
Text [email][] text {MD054}␊
|
||||
␊
|
||||
Text [email] text {MD054}␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-reference-definitions": false,␊
|
||||
|
|
@ -26348,6 +26424,66 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com][email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
25,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 25,
|
||||
editColumn: 6,
|
||||
insertText: '[user@example.com](user@example.com)',
|
||||
},
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email][]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
9,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 9,
|
||||
editColumn: 6,
|
||||
insertText: '[email](user@example.com)',
|
||||
},
|
||||
lineNumber: 77,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
7,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 7,
|
||||
editColumn: 6,
|
||||
insertText: '[email](user@example.com)',
|
||||
},
|
||||
lineNumber: 79,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Autolink or Inline␊
|
||||
␊
|
||||
|
|
@ -26419,6 +26555,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text␊
|
||||
␊
|
||||
Text <user@example.com> text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [email](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [email](user@example.com) text {MD054}␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-reference-definitions": false,␊
|
||||
|
|
@ -26735,6 +26883,22 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Autolink or Reference␊
|
||||
␊
|
||||
|
|
@ -26806,6 +26970,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text␊
|
||||
␊
|
||||
Text [email][] text␊
|
||||
␊
|
||||
Text [email] text␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-style": {␊
|
||||
|
|
@ -27247,6 +27423,70 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com][email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
25,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
7,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 79,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Collapsed Only␊
|
||||
␊
|
||||
|
|
@ -27318,6 +27558,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text {MD054}␊
|
||||
␊
|
||||
Text [email][] text␊
|
||||
␊
|
||||
Text [email] text {MD054}␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-style": {␊
|
||||
|
|
@ -27762,6 +28014,70 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email][]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
9,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 77,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
7,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 79,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Full Only␊
|
||||
␊
|
||||
|
|
@ -27833,6 +28149,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text␊
|
||||
␊
|
||||
Text [email][] text {MD054}␊
|
||||
␊
|
||||
Text [email] text {MD054}␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-style": {␊
|
||||
|
|
@ -28091,6 +28419,86 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 18,
|
||||
editColumn: 6,
|
||||
insertText: '[user@example.com](user@example.com)',
|
||||
},
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com][email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
25,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 25,
|
||||
editColumn: 6,
|
||||
insertText: '[user@example.com](user@example.com)',
|
||||
},
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email][]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
9,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 9,
|
||||
editColumn: 6,
|
||||
insertText: '[email](user@example.com)',
|
||||
},
|
||||
lineNumber: 77,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
7,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 7,
|
||||
editColumn: 6,
|
||||
insertText: '[email](user@example.com)',
|
||||
},
|
||||
lineNumber: 79,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Inline Only␊
|
||||
␊
|
||||
|
|
@ -28162,6 +28570,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com)␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [email](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [email](user@example.com) text {MD054}␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-reference-definitions": false,␊
|
||||
|
|
@ -28261,6 +28681,26 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 18,
|
||||
editColumn: 6,
|
||||
insertText: '[user@example.com](user@example.com)',
|
||||
},
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Inline or Reference␊
|
||||
␊
|
||||
|
|
@ -28332,6 +28772,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text␊
|
||||
␊
|
||||
Text [user@example.com][email] text␊
|
||||
␊
|
||||
Text [email][] text␊
|
||||
␊
|
||||
Text [email] text␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-style": {␊
|
||||
|
|
@ -28367,6 +28819,26 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 18,
|
||||
editColumn: 6,
|
||||
insertText: '[user@example.com](user@example.com)',
|
||||
},
|
||||
lineNumber: 50,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style No URL Inline Not Possible␊
|
||||
␊
|
||||
|
|
@ -28417,6 +28889,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [file.md](file.md) text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text␊
|
||||
␊
|
||||
Text [user@example.com][email] text␊
|
||||
␊
|
||||
Text [email][] text␊
|
||||
␊
|
||||
Text [email] text␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-image-style": {␊
|
||||
"autolink": false,␊
|
||||
|
|
@ -28522,6 +29006,19 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [file.md](file.md) text␊
|
||||
␊
|
||||
Text <user@example.com> text␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text␊
|
||||
(allowed by !url_inline because email address is not an absolute URL)␊
|
||||
␊
|
||||
Text [user@example.com][email] text␊
|
||||
␊
|
||||
Text [email][] text␊
|
||||
␊
|
||||
Text [email] text␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-image-style": {␊
|
||||
"url_inline": false␊
|
||||
|
|
@ -28994,6 +29491,86 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com][email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
25,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email][]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
9,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 77,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
7,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 79,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style None␊
|
||||
␊
|
||||
|
|
@ -29065,6 +29642,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text {MD054}␊
|
||||
␊
|
||||
Text [email][] text {MD054}␊
|
||||
␊
|
||||
Text [email] text {MD054}␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-reference-definitions": false,␊
|
||||
|
|
@ -29415,6 +30004,38 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Reference Only␊
|
||||
␊
|
||||
|
|
@ -29486,6 +30107,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text␊
|
||||
␊
|
||||
Text [email][] text␊
|
||||
␊
|
||||
Text [email] text␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-style": {␊
|
||||
|
|
@ -29896,6 +30529,70 @@ Generated by [AVA](https://avajs.dev).
|
|||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '<user@example.com>',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
18,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com](user@exampl...',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
36,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 73,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[user@example.com][email]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
25,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 75,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '[email][]',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
9,
|
||||
],
|
||||
fixInfo: null,
|
||||
lineNumber: 77,
|
||||
ruleDescription: 'Link and image style',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md054.md',
|
||||
ruleNames: [
|
||||
'MD054',
|
||||
'link-image-style',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Link Style Shortcut Only␊
|
||||
␊
|
||||
|
|
@ -29967,6 +30664,18 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}␊
|
||||
␊
|
||||
Text <user@example.com> text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com](user@example.com) text {MD054}␊
|
||||
␊
|
||||
Text [user@example.com][email] text {MD054}␊
|
||||
␊
|
||||
Text [email][] text {MD054}␊
|
||||
␊
|
||||
Text [email] text␊
|
||||
␊
|
||||
[email]: user@example.com␊
|
||||
␊
|
||||
<!-- markdownlint-configure-file {␊
|
||||
"link-fragments": false,␊
|
||||
"link-image-style": {␊
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue