billstclair / elm-html-template

Turn JSON templates and dictionaries into Elm Html
https://lisplog.org/elm-html-template/
MIT License
6 stars 0 forks source link

Don't strip commented special character from strings until rendering. #5

Closed billstclair closed 7 years ago

billstclair commented 7 years ago

["/let",{"x":"@@x"},"@x"] -> <LookupPageAtom "x">

That happens because "@@x" becomes "@x" after parsing, which is then interpreted as a LookupPageAtom.

It should parse as "@@x", and the @@ changed to @ at rendering time.

billstclair commented 7 years ago

Duh. This isn't a problem. The example should have been:

["/let",{"x":"@@x"},"$x"]

which properly evaluates to "@x", since "@@x" parses as a StringAtom, which does NOT get further evaluated.