Skip to content

Commit 8f0b895

Browse files
committed
fix #6134 handle spurious whitespace before Class keyword
1 parent 2bd0f26 commit 8f0b895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
8787
name = uri.path;
8888
} else if (fileExt === "cls") {
8989
// Allow Unicode letters
90-
const match = content.match(/^Class (%?[\p{L}\d]+(?:\.[\p{L}\d]+)+)/imu);
90+
const match = content.match(/^[ \t]*Class (%?[\p{L}\d]+(?:\.[\p{L}\d]+)+)/imu);
9191
if (match) {
9292
[, name, ext = "cls"] = match;
9393
}

0 commit comments

Comments
 (0)