Просмотр исходного кода

fix switch-case indent error

tags/v2.2.1
yongxiang.li 10 лет назад
Родитель
Сommit
fed8a63a85
1 измененных файлов: 23 добавлений и 23 удалений
  1. +23
    -23
      mustache.js

+ 23
- 23
mustache.js Просмотреть файл

@@ -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;


Загрузка…
Отмена
Сохранить