Skip to content

feat: add missing markdown container#5161

Open
chencu5958 wants to merge 2 commits intovuejs:mainfrom
chencu5958:feat/add-missing-container
Open

feat: add missing markdown container#5161
chencu5958 wants to merge 2 commits intovuejs:mainfrom
chencu5958:feat/add-missing-container

Conversation

@chencu5958
Copy link
Copy Markdown

Description

Add ::: note, ::: important, and ::: caution container support to VitePress markdown.

These containers were defined in ContainerOptions interface but were never registered in containerPlugin, so users couldn't use them via the ::: syntax.

Changes:

  • Add note container: options?.noteLabel || 'NOTE'
  • Add important container: options?.importantLabel || 'IMPORTANT'
  • Add caution container: options?.cautionLabel || 'CAUTION'

Usage:

::: note
This is a note.
:::

::: important
This is an important note.
:::

::: caution
This is a caution note
:::

Linked Issues

Additional Context

  • All existing tests pass (34 passed, 1 skipped)
  • ContainerOptions already defined noteLabel, importantLabel, cautionLabel but they were not being used
  • CSS variables and styles for these containers already exist in the theme
image image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant