Incompatibilities with jQuery Mobile

19 views
Skip to first unread message

Alex Raichev

unread,
Jul 4, 2014, 8:30:36 PM7/4/14
to rap...@googlegroups.com
Hi all,

I'm experimenting with jQuery Mobile and discovered an incompatibility with RapydML. Creating divs such as

div(data-role="controlgroup"):

(see http://api.jquerymobile.com/controlgroup/ for example), which have attribute names separated by dashes, elicits the RapydML error

Command data-role="controlgroup"' is not a valid mathematical operation  

It appears that RapydML is erroneously interpreting the dash as subtraction.

Alex

Alex Raichev

unread,
Jul 4, 2014, 9:35:30 PM7/4/14
to rap...@googlegroups.com
Sorry, my example is incorrect. It is

div(id="splat" data-role="controlgroup"):

that causes the error.  

That said, adding a comma rights things:

div(id="splat", data-role="controlgroup"):

No more compiler error.  Problem solved.  

Alex

Alexander Tsepkov

unread,
Jul 4, 2014, 10:38:45 PM7/4/14
to Alex Raichev, rap...@googlegroups.com
The version of the code without the comma is in fact incorrect, so RapydML reporting an error is correct behavior. Unfortunately, the errors thrown by RapydML are not always the ones you'd expect. That's because the compiler started as a weekend project using regexes to parse and generate html files. There are still occasional bugs I find in it, but overall it works really well for something that's written in such seemingly fragile way. Ideally, I'd rewrite it using the same core as RapydScript is now using, but I simply don't have the time to do so. And seeing how the current version is still working relatively well, I'm not in a rush to do so.
Reply all
Reply to author
Forward
0 new messages