Skip to content

Commit e763628

Browse files
committed
simplify the regex
1 parent 98dbc3f commit e763628

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export function stringToUUID(str: string): string {
2929

3030
export function addDebugIdToSource(input: string, debugId: string): string {
3131
return input.replace(
32-
/(\n*)?(\/\/# debugId=.+)?(\n*)?(\/\/# .+\n*)?$/,
33-
`\n//# debugId=${debugId}\n$4`
32+
/\n*(\/\/# debugId=.+)?\n*(\/\/# .+\n*)?$/,
33+
`\n//# debugId=${debugId}\n$2`
3434
);
3535
}
3636

0 commit comments

Comments
 (0)