@jgm wrote:
What’s under discussion is a syntax for a generic block container.
Ah. A generic block container. I wasn’t thinking in terms of that. If you want it generic, you could use ; --- type-of-block {.styling #goes in="here"}
(with curlies always required — just like with spans). Some examples:
Most-general syntax, here specifying a div (here with class="foo"
):
; --- div {.foo}
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
without any styling:
; --- div
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
though, you wouldn’t write that that way, since you could instead just do:
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
Leaving out the block-type (and only supplying the styling) defaults to giving you a div:
; --- {.foo}
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
An html5 <aside>
block, with class=“foo” and an extra helping of those handsome dashes:
; ------------ aside {.foo} --------------
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
and here with no styling:
; --------------- aside ------------------
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
Blockquotes:
; --- blockquote {.foo} ---
; Lorem ipsum datsun pompom carfax ronco
; enzo corvette blowfish sockdrawer fob
; condor shoehorn pickle doorstop manwich.
That works, but you’d likely much rather just write that instead using “markdown-native” syntax (“>
”):
> --- {.foo} ---
> Lorem ipsum datsun pompom carfax ronco
> enzo corvette blowfish sockdrawer fob
> condor shoehorn pickle doorstop manwich.
> Of course, blockquote
> with no styling.
Lineblocks — there’s no general block syntax because there’s no actual <lineblock>
tag, but we’ve still got the specific “|
” syntax:
| --- {.foo} ---
| Lorem ipsum datsun carfax
| ronco enzo corvette lomax
| And, of course, line
| block with no styling.
With this general syntax, you’d be giving up the shorthand syntax (where you could drop the curlies and the dot and write ; --- warning
instead of ; --- {.warning}
), but I think that’s probably reasonable, since it’s not that much of an extra readability cost to pay (and noting that divs simply aren’t going to be as seamless as blockquotes, code blocks, and line blocks, which have their own markdown native syntax and which are used all the time).