mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Simplified check for indentation difference
This commit is contained in:
1 parent
06d05b079e
commit
e11b08fa91
1 file changed
+1
-7
@@ -874,13 +874,7 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
function indentationIsDifferent(indentationString: string, startLinePosition: number): boolean {
|
||||
let size = indentationString.length;
|
||||
for (let i = 0; i < size; i++) {
|
||||
if (indentationString.charCodeAt(i) !== sourceFile.text.charCodeAt(startLinePosition + i)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return indentationString !== sourceFile.text.substr(startLinePosition , indentationString.length);
|
||||
}
|
||||
|
||||
function indentMultilineComment(commentRange: TextRange, indentation: number, firstLineIsIndented: boolean) {
|
||||
|
||||
Reference in new issue
Block a user