Closed tshort closed 6 years ago
Hi Tom, thanks for the issue — I think this makes sense, and am trying to remember why I thought using show
was a good idea at the time. I still occasionally get confused by the printing infrastructure, but revisiting this it looks like print
is the better choice here since we don't want to print Julia-specific formatting to the web if there's a better canonical representation.
I just pushed a commit to make your suggested change. And now:
julia> m("div", id = :hi, "hello")
<div id="hi">hello</div>
Great package, by the way! I really like the div.someclass and div."some-class" syntax.
Thanks!
In some cases, it'd be nice to be able to use Symbols instead of Strings for some values, especially ones that are names. Here's ana example:
Right now, this symbol is rendered as
":hi"
rather than"hi"
. Thesprint(show, ...)
construct causes this. Would it be possible to useprint
instead to get rid of the colon? Or, could we have some other way to do that?Great package, by the way! I really like the
div.someclass
anddiv."some-class"
syntax.