소스 검색

Another stack push/pop optimization

tags/0.5.0-vsc
thegrandpoobah 15 년 전
부모
커밋
27d3f73de1
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -3
      mustache.js

+ 2
- 3
mustache.js 파일 보기

@@ -515,9 +515,10 @@ var Mustache = function() {
return 'text';
case 'endSection':
var section = parserContext.stack.pop();
var section = parserContext.stack[parserContext.stack.length-1];
if (--section.depth === 0) {
if (section.key === key) {
parserContext.stack.pop();
this.commandSet.section.call(this, section.sectionType,
section.content,
key,
@@ -533,8 +534,6 @@ var Mustache = function() {
} else {
section.content.push('{{', '/', key, '}}');
parserContext.stack.push(section);
return 'endSectionScan';
}
default:


불러오는 중...
취소
저장