re-enabling the mis-dented call case. Issue #657

This commit is contained in:
Jeremy Ashkenas
2010-08-30 20:59:16 -04:00
parent 704fbf499b
commit 0caa731291
3 changed files with 28 additions and 13 deletions

View File

@@ -115,10 +115,12 @@
if (token[0] === 'CALL_START') {
condition = function(token, i) {
var _c;
return (')' === (_c = token[0]) || 'CALL_END' === _c);
return ((')' === (_c = token[0]) || 'CALL_END' === _c)) || (token[0] === 'OUTDENT' && this.tokens[i - 1][0] === ')');
};
action = function(token, i) {
return (token[0] = 'CALL_END');
var idx;
idx = token[0] === 'OUTDENT' ? i - 1 : i;
return (this.tokens[idx][0] = 'CALL_END');
};
this.detectEnd(i + 1, condition, action);
}