Parcourir la source

Merge pull request #510 from norfish/master

fix indent error in switch-case statement
tags/v2.2.1
David da Silva il y a 10 ans
Parent
révision
59cbf61a25
1 fichiers modifiés avec 23 ajouts et 23 suppressions
  1. +23
    -23
      mustache.js

+ 23
- 23
mustache.js Voir le fichier

@@ -267,19 +267,19 @@
token = tokens[i];

switch (token[0]) {
case '#':
case '^':
collector.push(token);
sections.push(token);
collector = token[4] = [];
break;
case '/':
section = sections.pop();
section[5] = token[2];
collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
break;
default:
collector.push(token);
case '#':
case '^':
collector.push(token);
sections.push(token);
collector = token[4] = [];
break;
case '/':
section = sections.pop();
section[5] = token[2];
collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
break;
default:
collector.push(token);
}
}

@@ -329,16 +329,16 @@
var index = this.tail.search(re), match;

switch (index) {
case -1:
match = this.tail;
this.tail = '';
break;
case 0:
match = '';
break;
default:
match = this.tail.substring(0, index);
this.tail = this.tail.substring(index);
case -1:
match = this.tail;
this.tail = '';
break;
case 0:
match = '';
break;
default:
match = this.tail.substring(0, index);
this.tail = this.tail.substring(index);
}

this.pos += match.length;


Chargement…
Annuler
Enregistrer