Skip to content

Commit f130d9b

Browse files
authored
Update admonition docs (#36589)
1 parent 7f348c5 commit f130d9b

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

stdlib/Markdown/docs/src/index.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -365,23 +365,26 @@ They can be defined using the following `!!!` syntax:
365365
This warning admonition has a custom title: `"Beware!"`.
366366
```
367367

368-
The type of the admonition can be any word made up of only lowercase Latin characters (a-z), but some types produce special styling,
369-
namely (in order of decreasing severity): `danger`, `warning`, `info`, `note`, and `tip`.
368+
The first word after `!!!` declares the type of the admonition.
369+
There are standard admonition types that should produce special styling.
370+
Namely (in order of decreasing severity): `danger`, `warning`, `info`/`note`, and `tip`.
370371

371-
A custom title for the box can be provided as a string (in double quotes) after the admonition type.
372-
For that standard types (`danger`, `warning`... etc_, if no title text is specified after the
373-
admonition type, then the type title used will be the type of the block.
374-
E.g. `"Note"` in the case of the `note` admonition.
372+
You can also use your own admonition types, as long as the type name only contains lowercase Latin characters (a-z).
373+
For example, you could have a `terminology` block like this:
375374

376-
If you would like to define your own block, for example a `terminology` block
377-
used like so:
378375
```
379376
!!! terminology "julia vs Julia"
380-
Strictly speaking, Julia refers to the language,
381-
and julia the standard implementation.
377+
378+
Strictly speaking, "Julia" refers to the language,
379+
and "julia" to the standard implementation.
382380
```
383381

384-
Admonitions, like most other toplevel elements, can contain other toplevel elements.
382+
However, unless the code rendering the Markdown special-cases that particular admonition type, it will get the default styling.
383+
384+
A custom title for the box can be provided as a string (in double quotes) after the admonition type.
385+
If no title text is specified after the admonition type, then the type name will be used as the title (e.g. `"Note"` for the `note` admonition).
386+
387+
Admonitions, like most other toplevel elements, can contain other toplevel elements (e.g. lists, images).
385388

386389
## Markdown Syntax Extensions
387390

0 commit comments

Comments
 (0)