Skip to content

Commit

Permalink
BEMHTML: #214 Inverse xhtml option default value to false
Browse files Browse the repository at this point in the history
  • Loading branch information
miripiruni committed Jun 30, 2016
1 parent caad627 commit 97574f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/bemhtml/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var BEMXJST = require('../bemxjst');
function BEMHTML(options) {
BEMXJST.apply(this, arguments);

var xhtml = typeof options.xhtml === 'undefined' ? true : options.xhtml;
var xhtml = typeof options.xhtml === 'undefined' ? false : options.xhtml;
this._shortTagCloser = xhtml ? '/>' : '>';

this._elemJsInstances = options.elemJsInstances;
Expand Down
4 changes: 2 additions & 2 deletions test/bemhtml-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('BEMHTML engine tests', function() {
);
}, {
block: 'page', elem: 'css', url: 'ohai'
}, '<link rel="stylesheet" href="ohai"/>');
}, '<link rel="stylesheet" href="ohai">');
});

it('should support `.xjstOptions()`', function() {
Expand All @@ -110,7 +110,7 @@ describe('BEMHTML engine tests', function() {
it('should close short tags by default', function() {
compile('')
.apply({ tag: 'br' })
.should.equal('<br/>');
.should.equal('<br>');
});

it('should not close short tags with xhtml: false', function() {
Expand Down
2 changes: 1 addition & 1 deletion test/runtime-applyctx-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Runtime applyCtx()', function() {
},
{ block: 'b1' },
'<div class="b1">' +
'<div class="b2">omg</div><br class="b3"/></div>');
'<div class="b2">omg</div><br class="b3"></div>');
});

it('should work with both context and changes', function() {
Expand Down

0 comments on commit 97574f5

Please sign in to comment.