marko-js-archive / marko-widgets

[LEGACY] Module to support binding of behavior to rendered UI components rendered on the server or client
http://v3.markojs.com/docs/marko-widgets/
MIT License
142 stars 40 forks source link

w-bind not working on tag with dynamic tag name #146

Closed patrick-steele-idem closed 8 years ago

patrick-steele-idem commented 8 years ago

Input template:

<${data.tag} class=data.classes w-bind >
  <div class="content">
    <invoke data.renderBody(out) />
    <div class="sub header" if(data.subheader)>${data.subheader}</div>
  </div>
</>

Bad output:

<h2 class="ui-heading" w-bind>
<div class="content">My Header</div>
</h2>

Issue reported by @tbashor: https://github.com/marko-js/marko/issues/253#issuecomment-233204182

patrick-steele-idem commented 8 years ago

Fixed by https://github.com/marko-js/marko/commit/b85b59d59485f9681c5d62dfedf352963d45f984