Don't normalize whitespace in fourslash tests (#18447)

* Don't normalize whitespace in fourslash tests

* Only render whitespace when the diff is text-only
This commit is contained in:
Andy
2017-09-14 08:23:50 -07:00
committed by GitHub
parent cf53743bd6
commit d96dfeb708
16 changed files with 82 additions and 83 deletions
+2 -1
View File
@@ -573,7 +573,7 @@ namespace ts.server {
getEditsForRefactor(
fileName: string,
_formatOptions: FormatCodeSettings,
formatOptions: FormatCodeSettings,
positionOrRange: number | TextRange,
refactorName: string,
actionName: string): RefactorEditInfo {
@@ -581,6 +581,7 @@ namespace ts.server {
const args = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName) as protocol.GetEditsForRefactorRequestArgs;
args.refactor = refactorName;
args.action = actionName;
args.formatOptions = formatOptions;
const request = this.processRequest<protocol.GetEditsForRefactorRequest>(CommandNames.GetEditsForRefactor, args);
const response = this.processResponse<protocol.GetEditsForRefactorResponse>(request);
+1
View File
@@ -494,6 +494,7 @@ namespace ts.server.protocol {
refactor: string;
/* The 'name' property from the refactoring action */
action: string;
formatOptions: FormatCodeSettings,
};
+1 -1
View File
@@ -1488,7 +1488,7 @@ namespace ts.server {
const result = project.getLanguageService().getEditsForRefactor(
file,
this.projectService.getFormatCodeOptions(),
convertFormatOptions(args.formatOptions),
position || textRange,
args.refactor,
args.action