Skip to content
This repository was archived by the owner on Mar 25, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ module.exports.toHtml = function(templatesStream) {
file.data || (file.data = _eval(String(file.contents)));

var html = tryCatch(function () {
return file.data.apply(bemjsonFile.data);
return file.data.bemhtml.apply(bemjsonFile.data);
}, function (err) {
throw new Error('BEMHTML error: ' + err);
});
Expand Down
5 changes: 3 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ describe('gulp-bemhtml', function () {
});

it('outputs bemhtml templates compiler', function () {
var bemhtml = _eval(vinylFile.contents.toString());
expect(bemhtml.apply({block: 'page'})).to.be.equal('<h1 class="page">Hello, world!</h1>');
var tmpl = _eval(vinylFile.contents.toString());

expect(tmpl.bemhtml.apply({block: 'page'})).to.be.equal('<h1 class="page">Hello, world!</h1>');
});
});

Expand Down