From 1ea7d9507452f2cef94d376b4728bc36f9547c8b Mon Sep 17 00:00:00 2001 From: fisker Date: Wed, 26 Aug 2020 01:12:17 +0800 Subject: [PATCH] Remove doc check --- src/document/doc-utils.js | 4 ---- src/language-html/printer-html.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/document/doc-utils.js b/src/document/doc-utils.js index 527d9868df6e..e31adbbca304 100644 --- a/src/document/doc-utils.js +++ b/src/document/doc-utils.js @@ -226,10 +226,6 @@ function normalizeParts(parts) { continue; } - if (part.type === "fill" && part.parts.length === 0) { - continue; - } - if (part.type === "concat") { restParts.unshift(...part.parts); continue; diff --git a/src/language-html/printer-html.js b/src/language-html/printer-html.js index 3ba98e697397..e1b1b214f745 100644 --- a/src/language-html/printer-html.js +++ b/src/language-html/printer-html.js @@ -87,7 +87,7 @@ function embed(path, print, textToDoc, options) { { parser }, { stripTrailingHardline: true } ); - isEmpty = doc === "" || normalizeDoc(doc).parts.length === 0; + isEmpty = doc === ""; } return concat([