These are chat archives for ractivejs/ractive

20th
Jan 2016
Bjorn Neergaard
@neersighted
Jan 20 2016 05:06
hey there
anyone know how ractive parses json in attributes?
I have a case where JSON is not being parse when it should be -- I get a string back, minus the commas
Martin Kolárik
@MartinKolarik
Jan 20 2016 10:39
@neersighted can you post the attribute here?
Bjorn Neergaard
@neersighted
Jan 20 2016 14:23
@MartinKolarik I think I figured it out
there is a greater underlying issue with commas in 0.7.3
I have some components where a reference to a certain variable means a comma is dropped and thus ractive parses the attribute as a string
and in some {{yield}} directives in components, commas are being eaten
AnturK/-tg-station@552252b
look over the code if you'd like, this guy is writing a ractive component for my project and has commas being eaten
the paticular attribute in question is
<ui-button params='{"id_tag": "{{id_tag}}", "pressure": "custom"}'
replacing id_tag with a static string/number or pressure with a reference solves it
ui-button is a component
there's too much going on behind the scences to totally isolate it, as it only happens in some components; but I'll try to create a reduced test case on jsfiddle