node-beml
node-beml copied to clipboard
Don't works mix, if elem has -
Example of not working code: th(elem="head-cell", mix="block:table, elem:head-cell")
This code works well: th(elem="head-cell", mix="block:table, elem:head")
Hello! I checked your case and also added test for it. Looks like dash in the mix element name works fine and problem is not here. Can you provide full block of code where this problem occurs?
All is ok, maybe this my mistake, sorry. But i has one more problem, if i use this code:
table(block="payment-table", mix="{block:table}, {block:table, mod:{theme:material}}")
I want to receive:
<table class="payment-table table table_theme_material">
But I get:
<table class="payment-table table_theme_material">
About the first problem, here is an example that works incorrectly (Code written in pug syntax)
table(block="payment-table", mix="block:table, mod:{theme:material}")
thead(elem="head", mix="block:table, elem:head")
tr(elem="head-row", mix="block:table, elem:head-row")
th(elem="head-cell", mix="block:table, elem:head-cell")
result:
<table class="payment-table table_theme_material">
<thead class="payment-table__head">
<tr class="payment-table__head-row">
<th class="payment-table__head-cell"></th>
</tr>
</thead>
</table>
About symbol -
table(block="payment-table", mix="block:table, mod:{theme:material}")
thead(elem="head", mix="block:table, elem:head")
tr(elem="head-row", mix="block:table, elem:headrow")
th(elem="head-cell", mix="block:table, elem:headcell")
Result
<table class="payment-table table_theme_material">
// in this line, mixin dont accepted
<thead class="payment-table__head">
<tr class="payment-table__head-row table__headrow">
<th class="payment-table__head-cell table__headcell"></th>
</tr>
</thead>
</table>
One more example
div(block="test")
div(elem="card", mix="block:card")
result:
<div class="test">
<div class="test__card"></div>
</div>