This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to reference refs/pull/288/head
in repository https://gitbox.apache.org/repos/asf/couchdb-escodegen.git

commit 8c4a74a03df934ab9c86e1478f1953b299fb6e6a
Author: Denis Kolegov <[email protected]>
AuthorDate: Fri Mar 18 04:57:03 2016 -0400

    Fix issue #260: smarter rendering of array elements across lines
---
 escodegen.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/escodegen.js b/escodegen.js
index 0360521..3d0f56f 100644
--- a/escodegen.js
+++ b/escodegen.js
@@ -2056,7 +2056,7 @@
             if (!expr.elements.length) {
                 return '[]';
             }
-            multiline = isPattern ? false : expr.elements.length > 1;
+            multiline = isPattern ? false : expr.elements.length > 10 && 
expr.elements[0].type !== Syntax.Literal;
             result = ['[', multiline ? newline : ''];
             withIndent(function (indent) {
                 var i, iz;

Reply via email to