Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "markdown: fix redundant leading spaces in markdown list" #7847

Merged
merged 3 commits into from Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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