decode-elements: contract violation
expected: txexpr-elements?
given: '((div ((span a)) "text" ))
How do I pass in multi-character strings that will be "unquoted" in the resulting HTML output? Do I have to write my own decode function for this?
Thanks,
Andrew
On Apr 24, 2019, at 11:00 AM, afo...@gmail.com wrote:How do I pass in multi-character strings that will be "unquoted" in the resulting HTML output? Do I have to write my own decode function for this?
First of all, from https://en.wikipedia.org/wiki/HTML_attribute#Description
<div span=2>text</div>
and
<div span="2">text</div>
are the same. That is, attributes are pretty much strings. Xexpr thus follows this, requiring that you always pass a string as an attribute.
To get what you want, you would write
◊div[#:span "2"]{text}
Or this:
◊div[#:span (number->string 2)]{text}
--
You received this message because you are subscribed to the Google Groups "Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pollenpub+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to poll...@googlegroups.com.