Further refine parseExprList indentation heuristic

Closes marijnh/tern#221
This commit is contained in:
Marijn Haverbeke
2013-08-27 12:52:02 +02:00
parent 6113324cd2
commit 2ace0fa8dc

View File

@@ -752,6 +752,7 @@
function parseExprList(close) {
var indent = curIndent, line = curLineStart, elts = [], continuedLine = nextLineStart;
next(); // Opening bracket
if (curLineStart > continuedLine) continuedLine = curLineStart;
while (!closes(close, indent + (curLineStart <= continuedLine ? 1 : 0), line)) {
var elt = parseExpression(true);
if (isDummy(elt)) {