Skip to content

Commit 1e5641b

Browse files
authored
Mangle comment for sorcery (#23006)
1 parent 3189d17 commit 1e5641b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/services.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,8 +1544,8 @@ namespace ts {
15441544
return checker.getSymbolAtLocation(node);
15451545
}
15461546

1547-
1548-
const sourceMapCommentRegExp = /^\/\/[@#] sourceMappingURL=(.+)$/gm;
1547+
// Sometimes tools can sometimes see the following line as a source mapping url comment, so we mangle it a bit (the [M])
1548+
const sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)$/gm;
15491549
const base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;
15501550
function scanForSourcemapURL(fileName: string) {
15511551
const mappedFile = sourcemappedFileCache.get(toPath(fileName, currentDirectory, getCanonicalFileName));

0 commit comments

Comments
 (0)