mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD054/link-image-style to split reference parameter into full/collapsed/shortcut parameters (fixes #918).
This commit is contained in:
parent
4390715f4b
commit
063310e51a
21 changed files with 2583 additions and 80 deletions
|
|
@ -119,7 +119,7 @@ Strong **with** different style {MD050}
|
|||
]
|
||||
},
|
||||
"link-image-style": {
|
||||
"reference": false
|
||||
"full": false
|
||||
}
|
||||
} -->
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ Text [url](https://example.com/an>g<le>) text {MD054}
|
|||
"link-image-reference-definitions": false,
|
||||
"link-image-style": {
|
||||
"inline": false,
|
||||
"reference": false
|
||||
"full": false,
|
||||
"collapsed": false,
|
||||
"shortcut": false
|
||||
}
|
||||
} -->
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ Text [url](https://example.com/an>g<le>) text
|
|||
"link-fragments": false,
|
||||
"link-image-reference-definitions": false,
|
||||
"link-image-style": {
|
||||
"reference": false
|
||||
"full": false,
|
||||
"collapsed": false,
|
||||
"shortcut": false
|
||||
}
|
||||
} -->
|
||||
|
|
|
|||
79
test/link-style-collapsed-only.md
Normal file
79
test/link-style-collapsed-only.md
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# Link Style reference_only
|
||||
|
||||
Text [url](https://example.com) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](<https://example.com>) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](https://example.com "title") text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text {MD054} [url](https://example.com
|
||||
"title") text
|
||||
|
||||
Text {MD054}  text
|
||||
|
||||
Text [text][url] text {MD054}
|
||||
|
||||
Text ![text][url] text {MD054}
|
||||
|
||||
Text [url][] text
|
||||
|
||||
Text ![url][] text
|
||||
|
||||
Text [url] text {MD054}
|
||||
|
||||
Text ![url] text {MD054}
|
||||
|
||||
Text <https://example.com> text {MD054}
|
||||
|
||||
[url]: https://example.com "title"
|
||||
|
||||
[undefined]
|
||||
|
||||
Text [url](https://example.com/embedded\3backslash) text {MD054}
|
||||
|
||||
Text [url](https://example.com/backslash\[escape) text {MD054}
|
||||
|
||||
Text [embedded-backslash] text {MD054}
|
||||
|
||||
Text [backslash-escape] text {MD054}
|
||||
|
||||
Text <https://example.com/embedded\3backslash> text {MD054}
|
||||
|
||||
Text <https://example.com/backslash[no-escape> text {MD054}
|
||||
|
||||
[embedded-backslash]: https://example.com/embedded\3backslash
|
||||
|
||||
[backslash-escape]: https://example.com/backslash\[escape
|
||||
|
||||
Text [url](<https://example.com/embedded space>) text {MD054}
|
||||
|
||||
Text [url](<https://example.com/embedded)paren>) text {MD054}
|
||||
|
||||
Text [url](https://example.com/\(parens\)) text {MD054}
|
||||
|
||||
Text [url](https://example.com/pa(re(ns))) text {MD054}
|
||||
|
||||
Text [url](relative/path) text {MD054}
|
||||
|
||||
Text [url](#fragment) text {MD054}
|
||||
|
||||
Text <https://example.com/pa)re(ns> text {MD054}
|
||||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
"inline": false,
|
||||
"full": false,
|
||||
"shortcut": false
|
||||
}
|
||||
} -->
|
||||
79
test/link-style-full-only.md
Normal file
79
test/link-style-full-only.md
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# Link Style reference_only
|
||||
|
||||
Text [url](https://example.com) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](<https://example.com>) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](https://example.com "title") text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text {MD054} [url](https://example.com
|
||||
"title") text
|
||||
|
||||
Text {MD054}  text
|
||||
|
||||
Text [text][url] text
|
||||
|
||||
Text ![text][url] text
|
||||
|
||||
Text [url][] text {MD054}
|
||||
|
||||
Text ![url][] text {MD054}
|
||||
|
||||
Text [url] text {MD054}
|
||||
|
||||
Text ![url] text {MD054}
|
||||
|
||||
Text <https://example.com> text {MD054}
|
||||
|
||||
[url]: https://example.com "title"
|
||||
|
||||
[undefined]
|
||||
|
||||
Text [url](https://example.com/embedded\3backslash) text {MD054}
|
||||
|
||||
Text [url](https://example.com/backslash\[escape) text {MD054}
|
||||
|
||||
Text [embedded-backslash] text {MD054}
|
||||
|
||||
Text [backslash-escape] text {MD054}
|
||||
|
||||
Text <https://example.com/embedded\3backslash> text {MD054}
|
||||
|
||||
Text <https://example.com/backslash[no-escape> text {MD054}
|
||||
|
||||
[embedded-backslash]: https://example.com/embedded\3backslash
|
||||
|
||||
[backslash-escape]: https://example.com/backslash\[escape
|
||||
|
||||
Text [url](<https://example.com/embedded space>) text {MD054}
|
||||
|
||||
Text [url](<https://example.com/embedded)paren>) text {MD054}
|
||||
|
||||
Text [url](https://example.com/\(parens\)) text {MD054}
|
||||
|
||||
Text [url](https://example.com/pa(re(ns))) text {MD054}
|
||||
|
||||
Text [url](relative/path) text {MD054}
|
||||
|
||||
Text [url](#fragment) text {MD054}
|
||||
|
||||
Text <https://example.com/pa)re(ns> text {MD054}
|
||||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
"inline": false,
|
||||
"collapsed": false,
|
||||
"shortcut": false
|
||||
}
|
||||
} -->
|
||||
|
|
@ -73,6 +73,8 @@ Text [url](https://example.com/an>g<le>) text
|
|||
"link-image-reference-definitions": false,
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
"reference": false
|
||||
"full": false,
|
||||
"collapsed": false,
|
||||
"shortcut": false
|
||||
}
|
||||
} -->
|
||||
|
|
|
|||
81
test/link-style-none.md
Normal file
81
test/link-style-none.md
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# Link Style autolink_only
|
||||
|
||||
Text [url](https://example.com) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](<https://example.com>) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](https://example.com "title") text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text {MD054} [url](https://example.com
|
||||
"title") text
|
||||
|
||||
Text {MD054}  text
|
||||
|
||||
Text [text][url] text {MD054}
|
||||
|
||||
Text ![text][url] text {MD054}
|
||||
|
||||
Text [url][] text {MD054}
|
||||
|
||||
Text ![url][] text {MD054}
|
||||
|
||||
Text [url] text {MD054}
|
||||
|
||||
Text ![url] text {MD054}
|
||||
|
||||
Text <https://example.com> text {MD054}
|
||||
|
||||
[url]: https://example.com "title"
|
||||
|
||||
[undefined]
|
||||
|
||||
Text [url](https://example.com/embedded\3backslash) text {MD054}
|
||||
|
||||
Text [url](https://example.com/backslash\[escape) text {MD054}
|
||||
|
||||
Text [embedded-backslash] text {MD054}
|
||||
|
||||
Text [backslash-escape] text {MD054}
|
||||
|
||||
Text <https://example.com/embedded\3backslash> text {MD054}
|
||||
|
||||
Text <https://example.com/backslash[no-escape> text {MD054}
|
||||
|
||||
[embedded-backslash]: https://example.com/embedded\3backslash
|
||||
|
||||
[backslash-escape]: https://example.com/backslash\[escape
|
||||
|
||||
Text [url](<https://example.com/embedded space>) text {MD054}
|
||||
|
||||
Text [url](<https://example.com/embedded)paren>) text {MD054}
|
||||
|
||||
Text [url](https://example.com/\(parens\)) text {MD054}
|
||||
|
||||
Text [url](https://example.com/pa(re(ns))) text {MD054}
|
||||
|
||||
Text [url](relative/path) text {MD054}
|
||||
|
||||
Text [url](#fragment) text {MD054}
|
||||
|
||||
Text <https://example.com/pa)re(ns> text {MD054}
|
||||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-reference-definitions": false,
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
"inline": false,
|
||||
"full": false,
|
||||
"collapsed": false,
|
||||
"shortcut": false
|
||||
}
|
||||
} -->
|
||||
79
test/link-style-shortcut-only.md
Normal file
79
test/link-style-shortcut-only.md
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# Link Style reference_only
|
||||
|
||||
Text [url](https://example.com) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](<https://example.com>) text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text [url](https://example.com "title") text {MD054}
|
||||
|
||||
Text  text {MD054}
|
||||
|
||||
Text {MD054} [url](https://example.com
|
||||
"title") text
|
||||
|
||||
Text {MD054}  text
|
||||
|
||||
Text [text][url] text {MD054}
|
||||
|
||||
Text ![text][url] text {MD054}
|
||||
|
||||
Text [url][] text {MD054}
|
||||
|
||||
Text ![url][] text {MD054}
|
||||
|
||||
Text [url] text
|
||||
|
||||
Text ![url] text
|
||||
|
||||
Text <https://example.com> text {MD054}
|
||||
|
||||
[url]: https://example.com "title"
|
||||
|
||||
[undefined]
|
||||
|
||||
Text [url](https://example.com/embedded\3backslash) text {MD054}
|
||||
|
||||
Text [url](https://example.com/backslash\[escape) text {MD054}
|
||||
|
||||
Text [embedded-backslash] text
|
||||
|
||||
Text [backslash-escape] text
|
||||
|
||||
Text <https://example.com/embedded\3backslash> text {MD054}
|
||||
|
||||
Text <https://example.com/backslash[no-escape> text {MD054}
|
||||
|
||||
[embedded-backslash]: https://example.com/embedded\3backslash
|
||||
|
||||
[backslash-escape]: https://example.com/backslash\[escape
|
||||
|
||||
Text [url](<https://example.com/embedded space>) text {MD054}
|
||||
|
||||
Text [url](<https://example.com/embedded)paren>) text {MD054}
|
||||
|
||||
Text [url](https://example.com/\(parens\)) text {MD054}
|
||||
|
||||
Text [url](https://example.com/pa(re(ns))) text {MD054}
|
||||
|
||||
Text [url](relative/path) text {MD054}
|
||||
|
||||
Text [url](#fragment) text {MD054}
|
||||
|
||||
Text <https://example.com/pa)re(ns> text {MD054}
|
||||
|
||||
Text [url](https://example.com/an>g<le>) text {MD054}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": false,
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
"inline": false,
|
||||
"full": false,
|
||||
"collapsed": false
|
||||
}
|
||||
} -->
|
||||
|
|
@ -915,7 +915,7 @@ test("readme", async(t) => {
|
|||
});
|
||||
|
||||
test("validateJsonUsingConfigSchemaStrict", async(t) => {
|
||||
t.plan(165);
|
||||
t.plan(169);
|
||||
const { addSchema, validate } =
|
||||
await import("@hyperjump/json-schema/draft-07");
|
||||
addSchema(configSchemaStrict, configSchemaStrictUri);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue