Proposal: (non-standard) markdown admonitions
(1) By juef on 2024-04-27 11:45:23 [source]
https://fossil-scm.org/home/vdiff?from=trunk&to=markdown-admonitions
Another experiment and proof of concept :)
If paragraph begins with special character set, add special styling or formatting.
They are:
:: FOLD ::
enclose text in <details><summary>
tags;
:: NOTE ::
, :: TIP ::
, :: IMPORTANT ::
, :: CAUTION ::
, :: WARNING ::
add special styling.
Known implementations
- github-admonitions (discussion, blog post)
- asciidoc-admonitions
- asciidoc-collapsible
- markdown-it (codimd, VS Code)
- gitlab-collapsible
Known limitations
- no new lines, i.e. 1 or more blank line(s)
- no nested blocks?
Other thoughts
Not sure about names, and syntax, could be:
- different name, e.g.
SPOILER
,COLLAPSIBLE
- different syntax, e.g.
[NOTE]
,%NOTE%
,[!NOTE]
- lowercase vs. uppercase vs. case-insensitive
- allow any names (alpha-num) to style paragraphs, just add built-in classes for known keywords
(2.1) By Stephan Beal (stephan) on 2024-04-27 12:15:52 edited from 2.0 in reply to 1 [link] [source]
gitlab-collapsible ... no nested blocks?
You can get that effect...
...click here...
by wrapping the whole thing in
a <details> ... </details> element
like the one wrapping this section. The above code block is only to demonstrate that this approach supports nested blocks.
Edit: and here's a nested...
details element