Skip to content

Commit

Permalink
Revert "markdown: fix redundant leading spaces in markdown list" (#7847)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 23, 2020
1 parent 8ec7bc2 commit 58ac3b0
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 353 deletions.
11 changes: 0 additions & 11 deletions src/language-markdown/printer-markdown.js
Expand Up @@ -509,17 +509,6 @@ function getAncestorNode(path, typeOrTypes) {
}

function printLine(path, value, options) {
const greatGrandParentNode = path.getParentNode(2);
if (greatGrandParentNode && greatGrandParentNode.type === "listItem") {
const parentNode = path.getParentNode();
const grandParentNode = path.getParentNode(1);
const index = grandParentNode.children.indexOf(parentNode);
const prevGrandParentNode = grandParentNode.children[index - 1];
if (prevGrandParentNode && prevGrandParentNode.type === "break") {
return "";
}
}

if (options.proseWrap === "preserve" && value === "\n") {
return hardline;
}
Expand Down

0 comments on commit 58ac3b0

Please sign in to comment.