Closed rcjsuen closed 3 years ago
As the second line already has a tab there, we should not be replacing a tab with a tab.
const library = require("dockerfile-language-service"); const service = library.DockerfileLanguageServiceFactory.createLanguageService(); const edits = service.formatOnType( "EXPOSE 8081 \n\t8082", {line: 0, position: 11}, "\\", { insertSpaces: false, tabSize: 4 } ); console.log(edits[0]);
{ range: { start: { line: 1, character: 0 }, end: { line: 1, character: 1 } }, newText: '\t' }
As the second line already has a tab there, we should not be replacing a tab with a tab.