diff options
-rw-r--r-- | lib/sourcemap.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sourcemap.js b/lib/sourcemap.js index 34299081..8e86ebd8 100644 --- a/lib/sourcemap.js +++ b/lib/sourcemap.js @@ -49,6 +49,9 @@ function SourceMap(options) { file : null, root : null, orig : null, + + orig_line_diff : 0, + dest_line_diff : 0, }); var generator = new MOZ_SourceMap.SourceMapGenerator({ file : options.file, @@ -67,8 +70,8 @@ function SourceMap(options) { name = info.name; } generator.addMapping({ - generated : { line: gen_line, column: gen_col }, - original : { line: orig_line, column: orig_col }, + generated : { line: gen_line + options.dest_line_diff, column: gen_col }, + original : { line: orig_line + options.orig_line_diff, column: orig_col }, source : source, name : name }); |