Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removing sourceColumn reset

  • Loading branch information...
commit 78d10f30a05a6de7fa458977c3ef55eb03cc8aac 1 parent 7f0610d
@jashkenas authored
View
5 lib/coffee-script/sourcemap.js
@@ -101,10 +101,7 @@
lastColumn = mapping.column;
buffer += this.encodeVlq(0);
buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine);
- if (lastSourceLine !== mapping.sourceLine) {
- lastSourceLine = mapping.sourceLine;
- lastSourceColumn = 0;
- }
+ lastSourceLine = mapping.sourceLine;
buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn);
lastSourceColumn = mapping.sourceColumn;
needComma = true;
View
4 src/sourcemap.litcoffee
@@ -108,9 +108,7 @@ The index into the list of sources:
The starting line in the original source, relative to the previous source line.
buffer += @encodeVlq mapping.sourceLine - lastSourceLine
- if lastSourceLine isnt mapping.sourceLine
- lastSourceLine = mapping.sourceLine
- lastSourceColumn = 0
+ lastSourceLine = mapping.sourceLine
The starting column in the original source, relative to the previous column.
View
4 test/sourcemap.coffee
@@ -31,8 +31,8 @@ test "SourceMap tests", ->
sourceRoot: "",
sourceFiles: ["source.coffee"],
generatedFile: "source.js"}
- eqJson testWithFilenames, '{"version":3,"file":"source.js","sourceRoot":"","sources":["source.coffee"],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAEA"}'
- eqJson map.generate(), '{"version":3,"file":"","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAEA"}'
+ eqJson testWithFilenames, '{"version":3,"file":"source.js","sourceRoot":"","sources":["source.coffee"],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}'
+ eqJson map.generate(), '{"version":3,"file":"","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA;;IACK,GAAC,CAAG;IAET"}'
# Look up a generated column - should get back the original source position.
arrayEq map.sourceLocation([2,8]), [1,9]
Please sign in to comment.
Something went wrong with that request. Please try again.