shama / yo-yoify

Transform choo, yo-yo or bel template strings into pure and fast document calls
111 stars 17 forks source link

Multiple class names are omitted #12

Closed finnp closed 8 years ago

finnp commented 8 years ago

This example would work fine in yo-yo:

var yo = require('yo-yo')

yo`<div class="${a} ${b}">`

But is turned into

    var bel0 = document.createElement("div")
bel0.setAttribute("class", arguments[0] + " ")
          return bel0
        }(a))

So the second class name is omitted. Of course there are easy work arounds, but it still seems like an error to me.

I only tested this with v1.0.4 so far.

finnp commented 8 years ago

This seems to be the case for all kinds of attributes, was running into it with a href attribute as well.