From cee29c2669b2802156c8d1976b29cfc69838c7d0 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 29 Nov 2010 13:43:05 -0600 Subject: [PATCH] Use parens around single line for comprehensions --- lib/eco/util.coffee | 2 +- test/test_render.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eco/util.coffee b/lib/eco/util.coffee index 6acc8a7..d720a82 100644 --- a/lib/eco/util.coffee +++ b/lib/eco/util.coffee @@ -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) -> diff --git a/test/test_render.coffee b/test/test_render.coffee index 0eab0ce..11e0a5e 100644 --- a/test/test_render.coffee +++ b/test/test_render.coffee @@ -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()}" test.same fixture("helpers.out.1"), output