mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Remove dead code
and revert skip action being changed to sentence case 😭
This commit is contained in:
@@ -93,13 +93,13 @@ function configToText(config: AdvancedSkipRule[]): string {
|
|||||||
result += "\nDisabled";
|
result += "\nDisabled";
|
||||||
break;
|
break;
|
||||||
case CategorySkipOption.ShowOverlay:
|
case CategorySkipOption.ShowOverlay:
|
||||||
result += "\nShow overlay";
|
result += "\nShow Overlay";
|
||||||
break;
|
break;
|
||||||
case CategorySkipOption.ManualSkip:
|
case CategorySkipOption.ManualSkip:
|
||||||
result += "\nManual skip";
|
result += "\nManual Skip";
|
||||||
break;
|
break;
|
||||||
case CategorySkipOption.AutoSkip:
|
case CategorySkipOption.AutoSkip:
|
||||||
result += "\nAuto skip";
|
result += "\nAuto Skip";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return null; // Invalid skip option
|
return null; // Invalid skip option
|
||||||
|
|||||||
@@ -229,7 +229,6 @@ type TokenType =
|
|||||||
|
|
||||||
export interface SourcePos {
|
export interface SourcePos {
|
||||||
line: number;
|
line: number;
|
||||||
// column: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Span {
|
export interface Span {
|
||||||
@@ -275,11 +274,8 @@ function nextToken(state: LexerState): Token {
|
|||||||
state.current++;
|
state.current++;
|
||||||
|
|
||||||
if (c === "\n") {
|
if (c === "\n") {
|
||||||
state.current_pos = { line: state.current_pos.line + 1, /* column: 1 */ };
|
// Cannot use state.current_pos.line++, because SourcePos is mutable and used in tokens without copying
|
||||||
} else {
|
state.current_pos = { line: state.current_pos.line + 1, };
|
||||||
// // TODO This will be wrong on anything involving UTF-16 surrogate pairs or grapheme clusters with multiple code units
|
|
||||||
// // So just don't show column numbers on errors for now
|
|
||||||
// state.current_pos = { line: state.current_pos.line, /* column: state.current_pos.column + 1 */ };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
|||||||
Reference in New Issue
Block a user