mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
be more vigorous about removing mid-expression newlines, 'when' closes implicit blocks, a better comment-detecting regex lexer that doesn't eat outdents
This commit is contained in:
@@ -469,8 +469,8 @@ module CoffeeScript
|
||||
indent = o[:indent]
|
||||
o[:indent] += TAB
|
||||
props = @properties.map { |prop|
|
||||
joiner = prop == @properties.last ? '' : prop.is_a?(CommentNode) ? "\n" : ",\n"
|
||||
o[:indent] + prop.compile(o) + joiner
|
||||
joiner = prop == @properties.first ? '' : prop.is_a?(CommentNode) ? "\n" : ",\n"
|
||||
joiner + o[:indent] + prop.compile(o)
|
||||
}.join('')
|
||||
write("{\n#{props}\n#{indent}}")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user