Explorar el Código

Style tweaks

tags/0.7.2
Michael Jackson hace 13 años
padre
commit
51eec96abc
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. +7
    -7
      mustache.js

+ 7
- 7
mustache.js Ver fichero

@@ -430,11 +430,11 @@ var Mustache;
* to a single token.
*/
function squashTokens(tokens) {
var token, lastToken, squashedTokens = [];
var squashedTokens = [];

for (var i = 0; i < tokens.length; ++i) {
var token, lastToken;
for (var i = 0, len = tokens.length; i < len; ++i) {
token = tokens[i];

if (lastToken && lastToken[0] === "text" && token[0] === "text") {
lastToken[1] += token[1];
lastToken[3] = token[3];
@@ -471,10 +471,10 @@ var Mustache;
var tagRes = escapeTags(tags);
var scanner = new Scanner(template);

var tokens = [], // Buffer to hold the tokens
spaces = [], // Indices of whitespace tokens on the current line
hasTag = false, // Is there a {{tag}} on the current line?
nonSpace = false; // Is there a non-space char on the current line?
var tokens = []; // Buffer to hold the tokens
var spaces = []; // Indices of whitespace tokens on the current line
var hasTag = false; // Is there a {{tag}} on the current line?
var nonSpace = false; // Is there a non-space char on the current line?

// Strips all whitespace tokens array for the current line
// if there was a {{#tag}} on it and otherwise only space.


Cargando…
Cancelar
Guardar