Open matklad opened 1 year ago
Also, ####
is nested under ###
, it'd be weired if for divs its the opposite, and :::
is nested under ::::
Yes, this is a good point...I guess, being familiar with this from pandoc, I always use the longer fence for the outer one.
Here's the original motivation for allowing longer closing fences (for both code and divs): it can look nice visually to balance the part of the opening line that has attributes with a longer line on the bottom.
::: {#note .important}
This is a note.
:::::::::::::::::::::::
Pandoc also supports this form, which is very nice visually:
::::::: warning :::::::
This is a warning.
:::::::::::::::::::::::
This consideration is weaker for djot, because in djot, you put the attributes above the div fence, and the second form isn't allowed (though maybe it should be).
A second argument is that if we allow fenced code to be closed by longer strings of backticks, it's consistent to do the same for fenced divs.
Neither of these arguments is super-strong, I'm just explaining the reasoning.
Current spec says:
This creates somewhat unintuitive results:
(the example extracted from a real-world bug in my blog)
An extra considiration is that you might start with just a single div. But, if you later decide to add extra content inside, the current rule requires you to update the outer div as well, which is a non-local modification.