Skip to content

Commit

Permalink
quick-fix with a different approach
Browse files Browse the repository at this point in the history
  • Loading branch information
hden committed Mar 20, 2013
1 parent 57d3cfd commit e091c9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/browser.coffee
Expand Up @@ -15,6 +15,7 @@ CoffeeScript.eval = (code, options = {}) ->
# Running code does not provide access to this scope.
CoffeeScript.run = (code, options = {}) ->
options.bare = on
options.shiftLine = on
Function(compile code, options)()

# If we're not in a browser environment, we're finished with the public API.
Expand Down
3 changes: 2 additions & 1 deletion src/coffee-script.coffee
Expand Up @@ -36,7 +36,8 @@ exports.compile = compile = (code, options = {}) ->
fragments = (parser.parse lexer.tokenize(code, options)).compileToFragments options

currentLine = 0
currentLine += 1 if options.header or options.inline
currentLine += 1 if options.header
currentLine += 1 if options.shiftLine
currentColumn = 0
js = ""
for fragment in fragments
Expand Down

0 comments on commit e091c9d

Please sign in to comment.