v.6.2.0
2016-03-24, v6.2.0, @miripiruni
New xhtml
option. Default value is true
. But in next major version we invert it.
xhtml
option allow you to ommit closing slash in void HTML elements (only have a start tag).
Example for v6.2.0:
var bemxjst = require('bem-xjst');
var templates = bemxjst.bemhtml.compile(function() {
// In this example we didn’t add templates
// bem-xjst will render by default
}, {
// Turn off XHTML
xhtml: false
});
var bemjson = { tag: 'br' };
var html = templates.apply(bemjson);
v6.2.0 result:
<br>
v6.1.1 result:
<br/>