mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00: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:
co-authored by
Wesley Wigham
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 {
|
||||
|
||||
Reference in New Issue
Block a user