Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
Use parens around single line for comprehensions
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Nov 29, 2010
1 parent 11a467e commit cee29c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/eco/util.coffee
Expand Up @@ -3,7 +3,7 @@ exports.repeat = repeat = (string, count) ->

exports.indent = (string, width) ->
space = repeat " ", width
lines = space + line for line in string.split "\n"
lines = (space + line for line in string.split "\n")
lines.join "\n"

exports.trim = (string) ->
Expand Down
2 changes: 1 addition & 1 deletion test/test_render.coffee
Expand Up @@ -49,7 +49,7 @@ module.exports =
output = eco.render fixture("helpers.eco"),
items: items
contentTag: (tagName, attributes, callback) ->
attrs = " #{name}=\"#{value}\"" for name, value of attributes
attrs = (" #{name}=\"#{value}\"" for name, value of attributes)
@safe "<#{tagName}#{attrs.join("")}>#{callback()}</#{tagName}>"

test.same fixture("helpers.out.1"), output
Expand Down

0 comments on commit cee29c2

Please sign in to comment.