fixing weepy's comment scenario

This commit is contained in:
Jeremy Ashkenas
2010-01-05 23:15:32 -05:00
parent 001e42b85c
commit 0275e7775f
2 changed files with 8 additions and 2 deletions

View File

@@ -69,6 +69,10 @@ module CoffeeScript
@tokens.delete_at(i + 2)
@tokens.delete_at(i - 2)
next 0
elsif prev[0] == "\n" && [:INDENT, :OUTDENT].include?(after[0])
@tokens.delete_at(i + 2)
@tokens[i - 1] = after
next 1
elsif !["\n", :INDENT, :OUTDENT].include?(prev[0])
@tokens.insert(i, ["\n", Value.new("\n", token[1].line)])
next 2