Fix blank lines between list items and nested sub-lists being removed in Markdown/MDX (#17857)
Co-authored-by: Tatsunori Uchino <tats.u@live.jp> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
1 parent
074aaedbb0
commit
4a673dc9b5
14 files changed
+802
-1
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#### Fix blank lines between list items and nested sub-lists being removed in Markdown/MDX (#17746 by @byplayer)
|
||||
|
||||
Prettier was removing blank lines between list items and their nested sub-lists, converting loose lists into tight lists and changing their semantic meaning.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```markdown
|
||||
<!-- Input -->
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
<!-- Prettier stable -->
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
<!-- Prettier main -->
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
```
|
||||
@@ -63,7 +63,10 @@ function shouldPrePrintDoubleHardline({ node, previous, parent }, options) {
|
||||
isLooseListItem(previous, options) ||
|
||||
(node.type === "list" &&
|
||||
parent.type === "listItem" &&
|
||||
previous.type === "code")
|
||||
(previous.type === "code" ||
|
||||
// Preserve blank line before nested list within listItem (issue #17746)
|
||||
previous.type === "paragraph") &&
|
||||
previous.position.end.line + 1 < node.position.start.line)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1232,6 +1232,7 @@ tabWidth: 0
|
||||
=====================================output=====================================
|
||||
- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1270,6 +1271,7 @@ tabWidth: 0
|
||||
|
||||
1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1311,6 +1313,7 @@ tabWidth: 0
|
||||
|
||||
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
|
||||
b b b b b b b b b b b b b b b
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1447,6 +1450,7 @@ tabWidth: 4
|
||||
=====================================output=====================================
|
||||
- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1485,6 +1489,7 @@ tabWidth: 4
|
||||
|
||||
1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1526,6 +1531,7 @@ tabWidth: 4
|
||||
|
||||
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
|
||||
b b b b b b b b b b b b b b b
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1662,6 +1668,7 @@ tabWidth: 999
|
||||
=====================================output=====================================
|
||||
- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1700,6 +1707,7 @@ tabWidth: 999
|
||||
|
||||
1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1741,6 +1749,7 @@ tabWidth: 999
|
||||
|
||||
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
|
||||
b b b b b b b b b b b b b b b b
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1876,6 +1885,7 @@ proseWrap: "always"
|
||||
=====================================output=====================================
|
||||
- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1914,6 +1924,7 @@ proseWrap: "always"
|
||||
|
||||
1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a
|
||||
|
||||
@@ -1955,6 +1966,7 @@ proseWrap: "always"
|
||||
|
||||
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
|
||||
b b b b b b b b b b b b b b b
|
||||
|
||||
- a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
|
||||
a a a a a a a a a a a a a a a
|
||||
|
||||
@@ -2339,6 +2351,7 @@ tabWidth: 0
|
||||
2. List
|
||||
|
||||
1. Some text, and code block below, with newline after code block
|
||||
|
||||
1. Another
|
||||
2. List
|
||||
|
||||
@@ -2397,6 +2410,7 @@ tabWidth: 4
|
||||
2. List
|
||||
|
||||
1. Some text, and code block below, with newline after code block
|
||||
|
||||
1. Another
|
||||
2. List
|
||||
|
||||
@@ -2455,6 +2469,7 @@ tabWidth: 999
|
||||
2. List
|
||||
|
||||
1. Some text, and code block below, with newline after code block
|
||||
|
||||
1. Another
|
||||
2. List
|
||||
|
||||
@@ -2512,6 +2527,7 @@ proseWrap: "always"
|
||||
2. List
|
||||
|
||||
1. Some text, and code block below, with newline after code block
|
||||
|
||||
1. Another
|
||||
2. List
|
||||
|
||||
@@ -2526,6 +2542,505 @@ proseWrap: "always"
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746.md - {"proseWrap":"always","tabWidth":0} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 0
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746.md - {"proseWrap":"always","tabWidth":4} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 4
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746.md - {"proseWrap":"always","tabWidth":999} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 999
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-before-list.md - {"proseWrap":"always","tabWidth":0} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 0
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-before-list.md - {"proseWrap":"always","tabWidth":4} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 4
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-before-list.md - {"proseWrap":"always","tabWidth":999} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 999
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-before-list.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-sibling-nested-list.md - {"proseWrap":"always","tabWidth":0} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 0
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-sibling-nested-list.md - {"proseWrap":"always","tabWidth":4} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 4
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-sibling-nested-list.md - {"proseWrap":"always","tabWidth":999} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 999
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-sibling-nested-list.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
\`\`\`
|
||||
b
|
||||
\`\`\`
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-fenced-code-then-nested-list.md - {"proseWrap":"always","tabWidth":0} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 0
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
- c
|
||||
|
||||
=====================================output=====================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-fenced-code-then-nested-list.md - {"proseWrap":"always","tabWidth":4} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 4
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
- c
|
||||
|
||||
=====================================output=====================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-fenced-code-then-nested-list.md - {"proseWrap":"always","tabWidth":999} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 999
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
- c
|
||||
|
||||
=====================================output=====================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-fenced-code-then-nested-list.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
- c
|
||||
|
||||
=====================================output=====================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-indented-code-then-nested-list.md - {"proseWrap":"always","tabWidth":0} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 0
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-indented-code-then-nested-list.md - {"proseWrap":"always","tabWidth":4} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 4
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-indented-code-then-nested-list.md - {"proseWrap":"always","tabWidth":999} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
tabWidth: 999
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-indented-code-then-nested-list.md - {"proseWrap":"always"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
proseWrap: "always"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":0} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
@@ -2615,12 +3130,15 @@ tabWidth: 0
|
||||
|
||||
=====================================output=====================================
|
||||
- 123
|
||||
|
||||
- abc
|
||||
|
||||
- 456
|
||||
|
||||
- def
|
||||
|
||||
- 789
|
||||
|
||||
- ghi
|
||||
|
||||
================================================================================
|
||||
@@ -2648,12 +3166,15 @@ tabWidth: 4
|
||||
|
||||
=====================================output=====================================
|
||||
- 123
|
||||
|
||||
- abc
|
||||
|
||||
- 456
|
||||
|
||||
- def
|
||||
|
||||
- 789
|
||||
|
||||
- ghi
|
||||
|
||||
================================================================================
|
||||
@@ -2681,12 +3202,15 @@ tabWidth: 999
|
||||
|
||||
=====================================output=====================================
|
||||
- 123
|
||||
|
||||
- abc
|
||||
|
||||
- 456
|
||||
|
||||
- def
|
||||
|
||||
- 789
|
||||
|
||||
- ghi
|
||||
|
||||
================================================================================
|
||||
@@ -2713,12 +3237,15 @@ proseWrap: "always"
|
||||
|
||||
=====================================output=====================================
|
||||
- 123
|
||||
|
||||
- abc
|
||||
|
||||
- 456
|
||||
|
||||
- def
|
||||
|
||||
- 789
|
||||
|
||||
- ghi
|
||||
|
||||
================================================================================
|
||||
@@ -2897,6 +3424,7 @@ tabWidth: 0
|
||||
=====================================output=====================================
|
||||
- parent list item parent list item parent list item parent list item parent
|
||||
list item parent list item
|
||||
|
||||
- child list item child list item child list item child list item child list
|
||||
item child list item
|
||||
|
||||
@@ -2905,6 +3433,7 @@ tabWidth: 0
|
||||
|
||||
- [x] parent task list item parent task list item parent task list item parent
|
||||
task list item
|
||||
|
||||
- [x] child task list item child task list item child task list item child
|
||||
task list item
|
||||
|
||||
@@ -2937,6 +3466,7 @@ tabWidth: 4
|
||||
=====================================output=====================================
|
||||
- parent list item parent list item parent list item parent list item parent
|
||||
list item parent list item
|
||||
|
||||
- child list item child list item child list item child list item child list
|
||||
item child list item
|
||||
|
||||
@@ -2945,6 +3475,7 @@ tabWidth: 4
|
||||
|
||||
- [x] parent task list item parent task list item parent task list item parent
|
||||
task list item
|
||||
|
||||
- [x] child task list item child task list item child task list item child
|
||||
task list item
|
||||
|
||||
@@ -2977,6 +3508,7 @@ tabWidth: 999
|
||||
=====================================output=====================================
|
||||
- parent list item parent list item parent list item parent list item parent
|
||||
list item parent list item
|
||||
|
||||
- child list item child list item child list item child list item child
|
||||
list item child list item
|
||||
|
||||
@@ -2985,6 +3517,7 @@ tabWidth: 999
|
||||
|
||||
- [x] parent task list item parent task list item parent task list item parent
|
||||
task list item
|
||||
|
||||
- [x] child task list item child task list item child task list item child
|
||||
task list item
|
||||
|
||||
@@ -3016,6 +3549,7 @@ proseWrap: "always"
|
||||
=====================================output=====================================
|
||||
- parent list item parent list item parent list item parent list item parent
|
||||
list item parent list item
|
||||
|
||||
- child list item child list item child list item child list item child list
|
||||
item child list item
|
||||
|
||||
@@ -3024,6 +3558,7 @@ proseWrap: "always"
|
||||
|
||||
- [x] parent task list item parent task list item parent task list item parent
|
||||
task list item
|
||||
|
||||
- [x] child task list item child task list item child task list item child
|
||||
task list item
|
||||
|
||||
@@ -4390,6 +4925,7 @@ tabWidth: 0
|
||||
[title](link)
|
||||
|
||||
- Text
|
||||
|
||||
- foo
|
||||
- foo
|
||||
- bar
|
||||
@@ -4449,6 +4985,7 @@ tabWidth: 4
|
||||
[title](link)
|
||||
|
||||
- Text
|
||||
|
||||
- foo
|
||||
- foo
|
||||
- bar
|
||||
@@ -4508,6 +5045,7 @@ tabWidth: 999
|
||||
[title](link)
|
||||
|
||||
- Text
|
||||
|
||||
- foo
|
||||
- foo
|
||||
- bar
|
||||
@@ -4566,6 +5104,7 @@ proseWrap: "always"
|
||||
[title](link)
|
||||
|
||||
- Text
|
||||
|
||||
- foo
|
||||
- foo
|
||||
- bar
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
@@ -0,0 +1,7 @@
|
||||
- a
|
||||
```
|
||||
b
|
||||
```
|
||||
- c
|
||||
|
||||
- d
|
||||
@@ -0,0 +1,6 @@
|
||||
- ```
|
||||
a
|
||||
```
|
||||
|
||||
- b
|
||||
- c
|
||||
@@ -0,0 +1,3 @@
|
||||
- a
|
||||
|
||||
- b
|
||||
@@ -0,0 +1,8 @@
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
@@ -1559,6 +1559,7 @@ proseWrap: "always"
|
||||
|
||||
=====================================output=====================================
|
||||
1. foo
|
||||
|
||||
- bar
|
||||
|
||||
================================================================================
|
||||
@@ -4464,6 +4465,7 @@ proseWrap: "always"
|
||||
\`\`\`
|
||||
|
||||
- baz
|
||||
|
||||
- \`\`\`
|
||||
foo
|
||||
|
||||
|
||||
@@ -376,6 +376,184 @@ opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-e
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746.mdx - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746.mdx format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-before-list.mdx - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-code-before-list.mdx format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-fenced-code-then-nested-list.mdx - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-fenced-code-then-nested-list.mdx format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- \`\`\`
|
||||
a
|
||||
\`\`\`
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-indented-code-then-nested-list.mdx - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-17746-indented-code-then-nested-list.mdx format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
=====================================output=====================================
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`jsx.mdx - {"semi":false} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["mdx"]
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
- d
|
||||
@@ -0,0 +1,5 @@
|
||||
- ```
|
||||
a
|
||||
```
|
||||
|
||||
- b
|
||||
@@ -0,0 +1,3 @@
|
||||
- a
|
||||
|
||||
- b
|
||||
@@ -0,0 +1,8 @@
|
||||
- a
|
||||
|
||||
- b
|
||||
|
||||
- c
|
||||
|
||||
|
||||
- d
|
||||
Reference in new issue
Block a user