feat: support `note`, `important`, `caution` markdown containers (#5161)

closes #4427
closes #3928
pull/5328/head
chencu 2 months ago committed by GitHub
parent 7118402227
commit 3b560a0efa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -56,6 +56,18 @@ This is a dangerous warning.
This is a details block.
:::
::: note
This is a note.
:::
::: important
This is an important note.
:::
::: caution
This is a caution note.
:::
### Custom Title
::: danger STOP

@ -14,6 +14,15 @@ export const containerPlugin = (
.use(...createContainer('warning', options?.warningLabel || 'WARNING', md))
.use(...createContainer('danger', options?.dangerLabel || 'DANGER', md))
.use(...createContainer('details', options?.detailsLabel || 'Details', md))
.use(...createContainer('note', options?.noteLabel || 'NOTE', md))
.use(
...createContainer(
'important',
options?.importantLabel || 'IMPORTANT',
md
)
)
.use(...createContainer('caution', options?.cautionLabel || 'CAUTION', md))
// explicitly escape Vue syntax
.use(container, 'v-pre', {
render: (tokens: Token[], idx: number) =>

Loading…
Cancel
Save