refactor(doc-utils): move rawText to printer-estree (#4309)

This commit is contained in:
Ika authored and GitHub committed 2018-04-14 00:05:00 +08:00
1 parent c814a9fa4d
commit 8e8a8d50cf
2 files changed
+5 -7

No files matched your search

+1 -6
View File
@@ -182,10 +182,6 @@ function stripTrailingHardline(doc) {
return doc;
}
function rawText(node) {
return node.extra ? node.extra.raw : node.raw;
}
module.exports = {
isEmpty,
willBreak,
@@ -194,6 +190,5 @@ module.exports = {
mapDoc,
propagateBreaks,
removeLines,
stripTrailingHardline,
rawText
stripTrailingHardline
};
+4 -1
View File
@@ -35,7 +35,6 @@ const docUtils = doc.utils;
const willBreak = docUtils.willBreak;
const isLineNext = docUtils.isLineNext;
const isEmpty = docUtils.isEmpty;
const rawText = docUtils.rawText;
function shouldPrintComma(options, level) {
level = level || "es5";
@@ -5527,6 +5526,10 @@ function printJsDocComment(comment) {
]);
}
function rawText(node) {
return node.extra ? node.extra.raw : node.raw;
}
module.exports = {
print: genericPrint,
embed,