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

master
Ika 2018-04-14 00:05:00 +08:00 committed by GitHub
parent c814a9fa4d
commit 8e8a8d50cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

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
};

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,