未验证 提交 4c0a06c7 编写于 作者: A Alex Dima

let -> const

上级 03b30ff3
...@@ -28,8 +28,8 @@ export class LineDecoration { ...@@ -28,8 +28,8 @@ export class LineDecoration {
} }
public static equalsArr(a: LineDecoration[], b: LineDecoration[]): boolean { public static equalsArr(a: LineDecoration[], b: LineDecoration[]): boolean {
let aLen = a.length; const aLen = a.length;
let bLen = b.length; const bLen = b.length;
if (aLen !== bLen) { if (aLen !== bLen) {
return false; return false;
} }
...@@ -49,8 +49,8 @@ export class LineDecoration { ...@@ -49,8 +49,8 @@ export class LineDecoration {
let result: LineDecoration[] = [], resultLen = 0; let result: LineDecoration[] = [], resultLen = 0;
for (let i = 0, len = lineDecorations.length; i < len; i++) { for (let i = 0, len = lineDecorations.length; i < len; i++) {
let d = lineDecorations[i]; const d = lineDecorations[i];
let range = d.range; const range = d.range;
if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) { if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) {
// Ignore decorations that sit outside this line // Ignore decorations that sit outside this line
...@@ -62,8 +62,8 @@ export class LineDecoration { ...@@ -62,8 +62,8 @@ export class LineDecoration {
continue; continue;
} }
let startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn); const startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn);
let endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn); const endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn);
result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type); result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type);
} }
...@@ -170,14 +170,14 @@ export class LineDecorationsNormalizer { ...@@ -170,14 +170,14 @@ export class LineDecorationsNormalizer {
let result: DecorationSegment[] = []; let result: DecorationSegment[] = [];
let stack = new Stack(); const stack = new Stack();
let nextStartOffset = 0; let nextStartOffset = 0;
for (let i = 0, len = lineDecorations.length; i < len; i++) { for (let i = 0, len = lineDecorations.length; i < len; i++) {
let d = lineDecorations[i]; const d = lineDecorations[i];
let startColumn = d.startColumn; let startColumn = d.startColumn;
let endColumn = d.endColumn; let endColumn = d.endColumn;
let className = d.className; const className = d.className;
// If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair // If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair
if (startColumn > 1) { if (startColumn > 1) {
...@@ -194,8 +194,8 @@ export class LineDecorationsNormalizer { ...@@ -194,8 +194,8 @@ export class LineDecorationsNormalizer {
} }
} }
let currentStartOffset = startColumn - 1; const currentStartOffset = startColumn - 1;
let currentEndOffset = endColumn - 2; const currentEndOffset = endColumn - 2;
nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result); nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册