Releases: bem/bem-xjst
Releases · bem/bem-xjst
4.3.1
Order of execution match
es was changed. Example:
// BEMJSON: { block: 'b' }
// Template:
block('b')(
// this.ctx.opa is undefined
match(function() { return this.ctx.opa; })(
content()(
// this match will not executed because of match before
match(function() { return true; })(function() {
return 'nope';
})
)
)
);
// Result: <div class="b"></div>
4.3.0
BEM-XJST will explicitly throw error if you try to pass arguments to shortcuts for predicates (attrs, bem, cls, content, js, mix, tag and etc).
// Incorrect!
block('b').tag('span'); // Will throw `BEMHTML error: Predicate should not have arguments`
// Correct:
block('b').tag()('span');
Commits:
- [
efa223d413
] - Throw error if args passed to shortcut predicates (Vladimir Grinenko)· - [
059c0b9bfb
] - Context: Remove unused BEM field (Vladimir Grinenko)· - [
351896b840
] - util: Remove unused NAME_PATTERN variable (Vladimir Grinenko)·