adding an if/else/chain test

This commit is contained in:
Jeremy Ashkenas
2010-02-13 02:00:39 -05:00
parent b965fcf32d
commit 506ea8aa52
3 changed files with 13 additions and 3 deletions

View File

@@ -202,7 +202,7 @@
this.i += indent.length;
next_character = this.chunk.match(MULTI_DENT)[4];
prev = this.tokens[this.tokens.length - 2];
no_newlines = next_character === '.' || (this.value().match(NO_NEWLINE) && prev && (prev[0] !== '.') && !this.value().match(CODE));
no_newlines = next_character === '.' || (this.value() && this.value().match(NO_NEWLINE) && prev && (prev[0] !== '.') && !this.value().match(CODE));
if (no_newlines) {
return this.suppress_newlines(indent);
}