Skip to content

Commit

Permalink
Merge pull request #9 from Huachao/master
Browse files Browse the repository at this point in the history
Refactor computeIndentLevel method
  • Loading branch information
aeschli authored Mar 14, 2018
2 parents 25eb4ce + b168294 commit f0fbb87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/impl/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function format(documentText: string, range: Range | undefined, options:
endOffset++;
}
formatText = documentText.substring(formatTextStart, endOffset);
initialIndentLevel = computeIndentLevel(formatText, 0, options);
initialIndentLevel = computeIndentLevel(formatText, options);
} else {
formatText = documentText;
initialIndentLevel = 0;
Expand Down Expand Up @@ -164,7 +164,7 @@ function repeat(s: string, count: number): string {
return result;
}

function computeIndentLevel(content: string, offset: number, options: FormattingOptions): number {
function computeIndentLevel(content: string, options: FormattingOptions): number {
let i = 0;
let nChars = 0;
let tabSize = options.tabSize || 4;
Expand Down

0 comments on commit f0fbb87

Please sign in to comment.