Clean up markdown "link" test (#19507)
This commit is contained in:
1 parent
88bc86f7bf
commit
a063b6ba1b
6 files changed
+160
-279
No files matched your search
@@ -1,28 +1,5 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`autolink.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
<https://www.example.com>
|
||||
|
||||
<hello@example.com>
|
||||
|
||||
<mailto:hello@example.com>
|
||||
|
||||
=====================================output=====================================
|
||||
<https://www.example.com>
|
||||
|
||||
<hello@example.com>
|
||||
|
||||
<mailto:hello@example.com>
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`autolink.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
@@ -45,44 +22,6 @@ proseWrap: "always"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`encodedLink.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[link](https://www.google.fr/()foo->bar)
|
||||
[link](https://www.google.fr/foo->bar)
|
||||
[link](https://www.google.fr/foo-%3Ebar)
|
||||
[link](https://www.google.fr/foo-<bar)
|
||||
[link](https://www.google.fr/foo-%3Cbar)
|
||||
foo->bar)
|
||||

|
||||

|
||||

|
||||

|
||||
[link]: https://www.google.fr/()foo->bar
|
||||
[link]: https://www.google.fr/foo->bar
|
||||
[link]: https://www.google.fr/foo-%3Ebar
|
||||
[link]: https://www.google.fr/foo-<bar
|
||||
[link]: https://www.google.fr/foo-%3Cbar
|
||||
=====================================output=====================================
|
||||
[link](<https://www.google.fr/()foo-%3Ebar>)
|
||||
[link](https://www.google.fr/foo->bar) [link](https://www.google.fr/foo-%3Ebar)
|
||||
[link](https://www.google.fr/foo-<bar) [link](https://www.google.fr/foo-%3Cbar)
|
||||
foo-%3Ebar>)
|
||||

|
||||

|
||||

|
||||
 [link]:
|
||||
https://www.google.fr/()foo->bar [link]: https://www.google.fr/foo->bar [link]:
|
||||
https://www.google.fr/foo-%3Ebar [link]: https://www.google.fr/foo-<bar [link]:
|
||||
https://www.google.fr/foo-%3Cbar
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`encodedLink.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
@@ -120,21 +59,6 @@ https://www.google.fr/foo-%3Cbar
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`entity.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[Test](http://localhost:8080/test?language=DE¤cy=EUR)
|
||||
|
||||
=====================================output=====================================
|
||||
[Test](http://localhost:8080/test?language=DE¤cy=EUR)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`entity.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
@@ -149,50 +73,6 @@ proseWrap: "always"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`escape-in-link.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
=====================================output=====================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`escape-in-link.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
=====================================output=====================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context)
|
||||
|
||||
=====================================output=====================================
|
||||
[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
@@ -207,21 +87,6 @@ proseWrap: "always"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`simple.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[hello](#world)
|
||||
|
||||
=====================================output=====================================
|
||||
[hello](#world)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`simple.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
@@ -236,146 +101,6 @@ proseWrap: "always"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`title.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[hello](#world "title")
|
||||
[hello](#world 'title')
|
||||
[hello](#world (title))
|
||||
|
||||
[a](https://example.com "\\"")
|
||||
[a](https://example.com '\\"')
|
||||
[a](https://example.com (\\"))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\'')
|
||||
[a](https://example.com (\\'))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\)')
|
||||
[a](https://example.com (\\)))
|
||||
|
||||
[a](https://example.com "\\\\\\"")
|
||||
[a](https://example.com '\\\\\\'')
|
||||
[a](https://example.com (\\\\\\)))
|
||||
|
||||
[a](https://example.com "\\\\'")
|
||||
[a](https://example.com '\\\\"')
|
||||
[a](https://example.com (\\\\"))
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com "\\"')")
|
||||
[a](https://example.com '"\\')')
|
||||
[a](https://example.com ("'\\)))
|
||||
|
||||
=====================================output=====================================
|
||||
[hello](#world 'title') [hello](#world 'title') [hello](#world 'title')
|
||||
|
||||
[a](https://example.com '"') [a](https://example.com '"')
|
||||
[a](https://example.com '"')
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com "'")
|
||||
[a](https://example.com "'")
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com ')')
|
||||
[a](https://example.com ')')
|
||||
|
||||
[a](https://example.com '\\\\"') [a](https://example.com "\\\\'")
|
||||
[a](https://example.com '\\\\)')
|
||||
|
||||
[a](https://example.com "\\\\'") [a](https://example.com '\\\\"')
|
||||
[a](https://example.com '\\\\"')
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com '"\\')') [a](https://example.com '"\\')')
|
||||
[a](https://example.com '"\\')')
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`title.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[hello](#world "title")
|
||||
[hello](#world 'title')
|
||||
[hello](#world (title))
|
||||
|
||||
[a](https://example.com "\\"")
|
||||
[a](https://example.com '\\"')
|
||||
[a](https://example.com (\\"))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\'')
|
||||
[a](https://example.com (\\'))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\)')
|
||||
[a](https://example.com (\\)))
|
||||
|
||||
[a](https://example.com "\\\\\\"")
|
||||
[a](https://example.com '\\\\\\'')
|
||||
[a](https://example.com (\\\\\\)))
|
||||
|
||||
[a](https://example.com "\\\\'")
|
||||
[a](https://example.com '\\\\"')
|
||||
[a](https://example.com (\\\\"))
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com "\\"')")
|
||||
[a](https://example.com '"\\')')
|
||||
[a](https://example.com ("'\\)))
|
||||
|
||||
=====================================output=====================================
|
||||
[hello](#world "title") [hello](#world "title") [hello](#world "title")
|
||||
|
||||
[a](https://example.com '"') [a](https://example.com '"')
|
||||
[a](https://example.com '"')
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com "'")
|
||||
[a](https://example.com "'")
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com ")")
|
||||
[a](https://example.com ")")
|
||||
|
||||
[a](https://example.com '\\\\"') [a](https://example.com "\\\\'")
|
||||
[a](https://example.com "\\\\)")
|
||||
|
||||
[a](https://example.com "\\\\'") [a](https://example.com '\\\\"')
|
||||
[a](https://example.com '\\\\"')
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com "\\"')") [a](https://example.com "\\"')")
|
||||
[a](https://example.com "\\"')")
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`url.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
https://www.example.com/
|
||||
|
||||
=====================================output=====================================
|
||||
https://www.example.com/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`url.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
runFormatTest(import.meta, ["markdown"], { proseWrap: "always" });
|
||||
runFormatTest(import.meta, ["markdown"], {
|
||||
proseWrap: "always",
|
||||
singleQuote: true,
|
||||
});
|
||||
@@ -0,0 +1,155 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`escape-in-link.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
=====================================output=====================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`escape-in-link.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
=====================================output=====================================
|
||||
"https\\://developer.mozilla.org" x
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`title.md - {"proseWrap":"always","singleQuote":true} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
singleQuote: true
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[hello](#world "title")
|
||||
[hello](#world 'title')
|
||||
[hello](#world (title))
|
||||
|
||||
[a](https://example.com "\\"")
|
||||
[a](https://example.com '\\"')
|
||||
[a](https://example.com (\\"))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\'')
|
||||
[a](https://example.com (\\'))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\)')
|
||||
[a](https://example.com (\\)))
|
||||
|
||||
[a](https://example.com "\\\\\\"")
|
||||
[a](https://example.com '\\\\\\'')
|
||||
[a](https://example.com (\\\\\\)))
|
||||
|
||||
[a](https://example.com "\\\\'")
|
||||
[a](https://example.com '\\\\"')
|
||||
[a](https://example.com (\\\\"))
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com "\\"')")
|
||||
[a](https://example.com '"\\')')
|
||||
[a](https://example.com ("'\\)))
|
||||
|
||||
=====================================output=====================================
|
||||
[hello](#world 'title') [hello](#world 'title') [hello](#world 'title')
|
||||
|
||||
[a](https://example.com '"') [a](https://example.com '"')
|
||||
[a](https://example.com '"')
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com "'")
|
||||
[a](https://example.com "'")
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com ')')
|
||||
[a](https://example.com ')')
|
||||
|
||||
[a](https://example.com '\\\\"') [a](https://example.com "\\\\'")
|
||||
[a](https://example.com '\\\\)')
|
||||
|
||||
[a](https://example.com "\\\\'") [a](https://example.com '\\\\"')
|
||||
[a](https://example.com '\\\\"')
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com '"\\')') [a](https://example.com '"\\')')
|
||||
[a](https://example.com '"\\')')
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`title.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
proseWrap: "always"
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
[hello](#world "title")
|
||||
[hello](#world 'title')
|
||||
[hello](#world (title))
|
||||
|
||||
[a](https://example.com "\\"")
|
||||
[a](https://example.com '\\"')
|
||||
[a](https://example.com (\\"))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\'')
|
||||
[a](https://example.com (\\'))
|
||||
|
||||
[a](https://example.com "\\'")
|
||||
[a](https://example.com '\\)')
|
||||
[a](https://example.com (\\)))
|
||||
|
||||
[a](https://example.com "\\\\\\"")
|
||||
[a](https://example.com '\\\\\\'')
|
||||
[a](https://example.com (\\\\\\)))
|
||||
|
||||
[a](https://example.com "\\\\'")
|
||||
[a](https://example.com '\\\\"')
|
||||
[a](https://example.com (\\\\"))
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com "\\"')")
|
||||
[a](https://example.com '"\\')')
|
||||
[a](https://example.com ("'\\)))
|
||||
|
||||
=====================================output=====================================
|
||||
[hello](#world "title") [hello](#world "title") [hello](#world "title")
|
||||
|
||||
[a](https://example.com '"') [a](https://example.com '"')
|
||||
[a](https://example.com '"')
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com "'")
|
||||
[a](https://example.com "'")
|
||||
|
||||
[a](https://example.com "'") [a](https://example.com ")")
|
||||
[a](https://example.com ")")
|
||||
|
||||
[a](https://example.com '\\\\"') [a](https://example.com "\\\\'")
|
||||
[a](https://example.com "\\\\)")
|
||||
|
||||
[a](https://example.com "\\\\'") [a](https://example.com '\\\\"')
|
||||
[a](https://example.com '\\\\"')
|
||||
|
||||
<!-- magical incantations -->
|
||||
|
||||
[a](https://example.com "\\"')") [a](https://example.com "\\"')")
|
||||
[a](https://example.com "\\"')")
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
File renamed without changes.
@@ -0,0 +1,5 @@
|
||||
runFormatTest(import.meta, ["markdown"], { proseWrap: "always" });
|
||||
runFormatTest(import.meta, ["markdown"], {
|
||||
proseWrap: "always",
|
||||
singleQuote: true,
|
||||
});
|
||||
File renamed without changes.
Reference in new issue
Block a user