You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @daig the short answer is that this is tricky to implement.
The detailed answer follows:
I'm currently using htmlparser2 to parse the Elmx (as HTML) into an AST and then from there generate the Elm code. The pro of this approach is that it keeps the elmx code small, the trade-off is that invalid HTML might break the parser and yield the wrong results (like in your example above).
Of course, this a sub-optimal implementation since not every Elmx needs to be a valid HTML, but it was a pragmatic decision (that we can review provided we find a better parser or an alternative approach).
For the time being, you can overcome this limitation by rewriting this:
Hi, great library!
Sometimes I'd like to nest Elmx syntax, for example when mapping over children:
but this doesn't get the right result.
Is there a fundamental barrier to nesting, or is it just extra tricky to implement?
The text was updated successfully, but these errors were encountered: