Skip to content

6.3.1

Compare
Choose a tag to compare
@miripiruni miripiruni released this 18 Apr 12:57
· 529 commits to master since this release

Improved error message about no block subpredicate.

Example:

$cat noblock.js
var bemxjst = require('bem-xjst');
var bemhtml = bemxjst.bemhtml;
var templates = bemhtml.compile(function() {
    tag()('span');
});


$ node noblock.js
/Users/miripiruni/Documents/www/bem-xjst-errors/lib/compiler.js:59
      throw new BEMXJSTError(e.message);
      ^
BEMXJSTError: block(…) subpredicate is not found.
    See template with subpredicates:
     * tag()
    And template body:
    ("span")
    at _compile (.../lib/compiler.js:60:13)
    at Compiler.compile (...//lib/compiler.js:79:3)
    at Object.<anonymous> (.../noblock.js:3:25)
    …