mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 11:43:18 -05: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:
@@ -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