Quellcode durchsuchen

fix switch-case indent error

tags/v2.2.1
yongxiang.li vor 10 Jahren
Ursprung
Commit
fed8a63a85
1 geänderte Dateien mit 23 neuen und 23 gelöschten Zeilen
  1. +23
    -23
      mustache.js

+ 23
- 23
mustache.js Datei anzeigen

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


switch (token[0]) { 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; var index = this.tail.search(re), match;


switch (index) { 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; this.pos += match.length;


Laden…
Abbrechen
Speichern