Skip to content

Commit

Permalink
refactor(doc-utils): move rawText to printer-estree (prettier#4309)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatyang authored Apr 13, 2018
1 parent c814a9f commit 8e8a8d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/doc/doc-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ function stripTrailingHardline(doc) {
return doc;
}

function rawText(node) {
return node.extra ? node.extra.raw : node.raw;
}

module.exports = {
isEmpty,
willBreak,
Expand All @@ -194,6 +190,5 @@ module.exports = {
mapDoc,
propagateBreaks,
removeLines,
stripTrailingHardline,
rawText
stripTrailingHardline
};
5 changes: 4 additions & 1 deletion src/language-js/printer-estree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -5527,6 +5526,10 @@ function printJsDocComment(comment) {
]);
}

function rawText(node) {
return node.extra ? node.extra.raw : node.raw;
}

module.exports = {
print: genericPrint,
embed,
Expand Down

0 comments on commit 8e8a8d5

Please sign in to comment.