Use the SourceMapSource to get line and column instead of current source file

Fixes #29300
This commit is contained in:
Sheetal Nandi
2019-01-11 12:24:33 -08:00
parent b23664adf7
commit 021c63f1c3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4389,7 +4389,7 @@ namespace ts {
return;
}
const { line: sourceLine, character: sourceCharacter } = getLineAndCharacterOfPosition(currentSourceFile!, pos);
const { line: sourceLine, character: sourceCharacter } = getLineAndCharacterOfPosition(sourceMapSource, pos);
sourceMapGenerator!.addMapping(
writer.getLine(),
writer.getColumn(),
@@ -1,5 +1,5 @@
// [source.js.map]
{"version":3,"file":"source.js","sourceRoot":"","sources":["source.ts","another.html"],"names":[],"mappings":"AAAA,iCACyB,CAAA;ACDzB,QACE,CDCM"}
{"version":3,"file":"source.js","sourceRoot":"","sources":["source.ts","another.html"],"names":[],"mappings":"AAAA,iCACyB,CAAA;ACDzB,QAAS,CDED"}
// [source.js]
"multi\n line";