mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
fix(sourcemap): accept a sourceMappingURL that ends with a newline (#45983)
* fix(sourcemap): accept a sourceMappingURL that ends with a newline * Update src/compiler/sourcemap.ts Co-authored-by: Wesley Wigham <wwigham@gmail.com>
This commit is contained in:
parent
cadd115a55
commit
46a12fdb8a
@ -322,7 +322,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
// Sometimes tools can see the following line as a source mapping url comment, so we mangle it a bit (the [M])
|
||||
const sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)$/;
|
||||
const sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
|
||||
|
||||
const whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/;
|
||||
|
||||
export interface LineInfo {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user