refactor(doc-utils): move `rawText` to printer-estree (#4309)
parent
c814a9fa4d
commit
8e8a8d50cf
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue