Skip to content

Commit 9e3a8bb

Browse files
committed
Fix lint
1 parent 3cf1fa3 commit 9e3a8bb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function decodeLine(line: string): string {
2727
}
2828

2929
export function encodeLine(line: string, isKey?: boolean): string {
30-
line = line.replace(isKey ? ENCODE_KEY_PATTERN : ENCODE_PATTERN, (c) => {
30+
let str = line.replace(isKey ? ENCODE_KEY_PATTERN : ENCODE_PATTERN, (c) => {
3131
if (c === '\t') {
3232
return '\\t';
3333
} else if (c === '\r') {
@@ -47,12 +47,12 @@ export function encodeLine(line: string, isKey?: boolean): string {
4747
}
4848
});
4949
if (!isKey) {
50-
const c = line.charAt(0);
50+
const c = str.charAt(0);
5151
if (c === ' ' || c === '\t' || c === '\f') {
52-
line = '\\' + line;
52+
str = '\\' + str;
5353
}
5454
}
55-
return line;
55+
return str;
5656
}
5757

5858
/**

0 commit comments

Comments
 (0)