grych / drab

Remote controlled frontend framework for Phoenix.
https://tg.pl/drab
MIT License
872 stars 43 forks source link

Quotes for additional argument changed in V.077 #117

Closed guidotripaldi closed 6 years ago

guidotripaldi commented 6 years ago

Previously, you could freely choose how to use double and single quotes when passing an argument to an arity/3 handler call:

<button drab='click:button_clicked("<%= some_value =>")'>

and

<button drab="click:button_clicked('<%= some_value =>')">

both works in 0.7.6.

In 0.7.7 you can only use this form:

<button drab="click:button_clicked('<%= some_value =>')">

Is this intended?

grych commented 6 years ago

Not intended, both forms should work. Thanks for reporting!

grych commented 6 years ago

Could you please share the value of some_value? I can't reproduce it in my environment.

grych commented 6 years ago

OK got it, thanks a lot, this is quite an unusual issue cause by how Floki renders back the html. I am raising an issue there, in the meantime please use the working form.

OvermindDL1 commented 6 years ago

@grych Have you looked at ModestEx, it wraps the modest library, which is designed for HTML manipulation and as such it might work in a more expected way?

grych commented 6 years ago

Hey @OvermindDL1, I even spoke to F34nk during the ConfEU :) Yes, I am planning to give it a try.

grych commented 6 years ago

Fixed in floki 0.20.2; please upgrade to this version, next release of Drab will require >=0.20.2

guidotripaldi commented 6 years ago

checked. Works great!