add container directives, and admonitions as their first user
`:::name{…}`, a body of Markdown, then `:::`. This spends the form reserved by
ADR-0059 rather than leaving it a promise — and building it back then would have
been a mechanism with no user, which is what the reserve was avoiding.
The body renders first and reaches the theme fragment as .Body, already HTML, so
emphasis, links, subscripts and icons all work inside an admonition. That is one
addition to the theme contract, additive as the stability rule requires, and two
lines of core — which is what the remaining budget allowed.
Rendered by a transformer rather than the node renderer, for the same reason an
include is: rendering a subtree needs the document, and a node renderer never
gets one.
When the theme has no template for a kind, the engine writes the body out
unwrapped. Same principle as an unknown icon keeping its text, and it matters
more here: a theme not knowing one name must never cost an author paragraphs,
and an unstyled aside is a far smaller failure than a missing one.
The leaf parser was parameterised by prefix rather than copied — a second copy of
parsing logic is a stop condition, and the two forms differ by one colon.
Containers do not nest: a `:::` inside closes the one it is in, the same limit an
include carries. Stated in the ADR and the contract rather than left to be found.
core 2796/2800, ext 1743/2000, 34 gates green, 0 warnings.
This commit is contained in:
@@ -23,6 +23,11 @@ dropped. Readings go to the NIWA archive, and the definition below expands every
|
||||
|
||||
*[NIWA]: National Institute of Water and Atmospheric Research
|
||||
|
||||
:::warn{title="Calibration"}
|
||||
The south gauge reads low after a storm, so readings are corrected against the north one. A container's body
|
||||
is Markdown: *emphasis*, links and H~2~O all work inside it.
|
||||
:::
|
||||
|
||||
:warn: The south gauge reads low after a storm — the theme decides what that icon is, and an unknown one like
|
||||
:nosuchicon: keeps its text. Times like 10:30:15 and pairs like key:value:pair are left alone.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user