@@ -11,7 +11,9 @@ var undef,
1111 },
1212 SHORT_TAGS = { // хэш для быстрого определения, является ли тэг коротким
1313 area : 1, base : 1, br : 1, col : 1, command : 1, embed : 1, hr : 1, img : 1,
14- input : 1, keygen : 1, link : 1, meta : 1, param : 1, source : 1, wbr : 1 };
14+ input : 1, keygen : 1, link : 1, meta : 1, param : 1, source : 1, wbr : 1 },
15+ skipApplyNext = context.skipApplyNext ||
16+ function noop(ctx, cb) { return cb.call(ctx); };
1517
1618(function(BEM, undefined) {
1719
@@ -188,6 +190,7 @@ function BEMContext(context, apply_) {
188190 this.elem = undef;
189191 this.mods = undef;
190192 this.elemMods = undef;
193+ this._skipApplyNext = skipApplyNext;
191194}
192195
193196BEMContext.prototype.isArray = isArray;
@@ -453,12 +456,14 @@ def()(function() {
453456
454457 var content = apply('content');
455458 if(content || content === 0) {
456- isBEM = vBlock || this.elem;
457- apply('', {
458- _notNewList : false,
459- position : isBEM? 1 : this.position,
460- _listLength : isBEM? 1 : this._listLength,
461- ctx : content
459+ this._skipApplyNext(this, function() {
460+ isBEM = vBlock || this.elem;
461+ apply('', {
462+ _notNewList : false,
463+ position : isBEM? 1 : this.position,
464+ _listLength : isBEM? 1 : this._listLength,
465+ ctx : content
466+ });
462467 });
463468 }
464469
0 commit comments