Closed MichaelHatherly closed 2 years ago
Here's a link to how the reference implementation handles these kind of inputs: https://spec.commonmark.org/dingus/?text=%3Cinput%0A%3E
Thanks! Let's make this change, but we also need to get rid of the whitespace, because of a 'bug' in pluto that displays all whitespace inside the data viewer:
[Slider(1:10), TextField()]
A minifying step seems like a bit much right now in Julia, I would be worried that the implementation is not well tested (but perhaps it can be done with HyperScript.jl?), so let's just sacrifice readabilty in our code for now :)
A minifying step seems like a bit much right now in Julia, I would be worried that the implementation is not well tested (but perhaps it can be done with HyperScript.jl?), so let's just sacrifice readabilty in our code for now :)
Yeah, sounds like a reasonable route for now. The whitespace issue might not actually be much of a problem in practice hopefully :crossed_fingers:
I don't think anyone really noticed no
Noticed when trying out https://github.com/MichaelHatherly/CommonMark.jl/issues/31.
Some of the formatting of closing
>
s for the HTML tags put them on their own lines. The commonmark spec doesn't really like this, and instead parses the dangling>
as the start of a quote block, which leaves the preceding HTML as raw text. This is pretty reasonable for the spec to do since markdown syntax has precedence over embedded HTML. All this PR does is move those>
s to the previous line and things work out nicely.Another more global change could be to have
@htl
do some minifying and strip out white space characters from it's output such that the user doesn't have to care about the white space sensitivity of embedded HTML in markdown.