Permalink
Browse files

removing sourceColumn reset

  • Loading branch information...
1 parent 7f0610d commit 78d10f30a05a6de7fa458977c3ef55eb03cc8aac @jashkenas committed Mar 18, 2013
Showing with 4 additions and 9 deletions.
  1. +1 −4 lib/coffee-script/sourcemap.js
  2. +1 −3 src/sourcemap.litcoffee
  3. +2 −2 test/sourcemap.coffee
Oops, something went wrong.
@@ -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.
@@ -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]

0 comments on commit 78d10f3

Please sign in to comment.