Skip to content

Commit

Permalink
Style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Dec 28, 2012
1 parent 381aca9 commit 320ae73
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
nonSpace = false;
}

var start, type, value, chr;
var start, type, value, chr, token;
while (!scanner.eos()) {
start = scanner.pos;
value = scanner.scanUntil(tagRes[0]);
Expand All @@ -413,24 +413,21 @@
nonSpace = true;
}

tokens.push(["text", chr, start, start + 1]);
tokens.push(['text', chr, start, start + 1]);
start += 1;

if (chr === "\n") {
stripSpace(); // Check for whitespace on the current line.
}
// Check for whitespace on the current line.
if (chr == '\n') stripSpace();
}
}

start = scanner.pos;

// Match the opening tag.
if (!scanner.scan(tagRes[0])) {
break;
}

if (!scanner.scan(tagRes[0])) break;
hasTag = true;
type = scanner.scan(tagRe) || "name";

type = scanner.scan(tagRe) || 'name';

// Skip any whitespace between tag and value.
scanner.scan(whiteRe);
Expand Down Expand Up @@ -468,7 +465,7 @@
}
}

var token = [type, value, start, scanner.pos];
token = [type, value, start, scanner.pos];
tokens.push(token);

if (type === '#' || type === '^') {
Expand Down

0 comments on commit 320ae73

Please sign in to comment.