[loose parser] Fix bug in continued-expression closing

When the continued expression sat on column 1 after a non-whitespace char,
the heuristic would consider it the start of the line, even though it wasn't.

Issue marijnh/tern#141
This commit is contained in:
Marijn Haverbeke
2013-05-15 12:02:48 +02:00
parent 9eee5300db
commit 6dd35f870a

View File

@@ -190,7 +190,7 @@
}
function tokenStartsLine() {
for (var p = token.start - 1; p > curLineStart; --p) {
for (var p = token.start - 1; p >= curLineStart; --p) {
var ch = input.charCodeAt(p);
if (ch !== 9 && ch !== 32) return false;
}