fixed lineno

This commit is contained in:
Hao-kang Den
2013-03-18 09:04:53 +08:00
parent c24e957f17
commit 5fb047930e
4 changed files with 4 additions and 4 deletions

View File

@@ -24,7 +24,7 @@
options.inline = true;
_ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap;
answer = btoa(v3SourceMap);
res = "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + answer + "\n//@ sourceURL=coffeescript.coffee";
res = "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + answer + "\n//@ sourceURL=coffeescript";
} else {
res = CoffeeScript.compile(code, options);
}

View File

@@ -50,7 +50,7 @@
}
fragments = (parser.parse(lexer.tokenize(code, options))).compileToFragments(options);
currentLine = 0;
if (options.header) {
if (options.header || options.inline) {
currentLine += 1;
}
currentColumn = 0;