Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78d10f3

Browse files
committed
removing sourceColumn reset
1 parent 7f0610d commit 78d10f3

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

lib/coffee-script/sourcemap.js

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sourcemap.litcoffee

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ The index into the list of sources:
108108
The starting line in the original source, relative to the previous source line.
109109

110110
buffer += @encodeVlq mapping.sourceLine - lastSourceLine
111-
if lastSourceLine isnt mapping.sourceLine
112-
lastSourceLine = mapping.sourceLine
113-
lastSourceColumn = 0
111+
lastSourceLine = mapping.sourceLine
114112
115113
The starting column in the original source, relative to the previous column.
116114

test/sourcemap.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ test "SourceMap tests", ->
3131
sourceRoot: "",
3232
sourceFiles: ["source.coffee"],
3333
generatedFile: "source.js"}
34-
eqJson testWithFilenames, '{"version":3,"file":"source.js","sourceRoot":"","sources":["source.coffee"],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAEA"}'
35-
eqJson map.generate(), '{"version":3,"file":"","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAEA"}'
34+
eqJson testWithFilenames, '{"version":3,"file":"source.js","sourceRoot":"","sources":["source.coffee"],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}'
35+
eqJson map.generate(), '{"version":3,"file":"","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}'
3636

3737
# Look up a generated column - should get back the original source position.
3838
arrayEq map.sourceLocation([2,8]), [1,9]

0 commit comments

Comments
 (0)