We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build does not error or warn when a user wrongfully uses a non-supported custom container ( https://vitepress.dev/guide/markdown#custom-containers ), like ::: NOTE, ref:
::: NOTE
note
Current behavior is just to build with no warning or error, which makes it harder to catch issues like this:
Error or warn when using a non-supported custom container.
No response
The text was updated successfully, but these errors were encountered:
One more example that could've been caught during build: jdx/mise#3876
Sh code block used: :::sh <code> ::: Should've been: ```sh <code> ```
Sh code block used:
:::sh <code> :::
Should've been:
```sh <code> ```
Sorry, something went wrong.
As a workaround, you can add something like this:
import { defineConfig } from 'vitepress'; import mditContainer from 'markdown-it-container'; export default defineConfig({ markdown: { config(md) { mditContainer(md, '_', { validate(params) { params = params.trim(); if (params) console.warn( `\n\x1b[33mUnknown markdown container - ${params}\x1b[0m` ); return false; }, }); }, }, });
It won't show you the file name / line number though.
https://stackblitz.com/edit/vite-yhmisdwk?file=docs/.vitepress/config.ts
No branches or pull requests
Is your feature request related to a problem? Please describe.
Build does not error or warn when a user wrongfully uses a non-supported custom container ( https://vitepress.dev/guide/markdown#custom-containers ), like
::: NOTE
, ref:note
to custom containers #4427Current behavior is just to build with no warning or error, which makes it harder to catch issues like this:
Describe the solution you'd like
Error or warn when using a non-supported custom container.
Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: