-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
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
[FR] Frontmatter config to disable <> tags parsing #4622
Comments
It's hard to do that on per-page basis. You can configure it globally, but then you won't be able to use any kind of html in your markdown files: import { defineConfig } from 'vitepress';
export default defineConfig({
markdown: {
html: false,
},
}); I'd recommend just escape it manually - |
Yeah well it's just on that specific page only :( |
These are generated automatically on each day using a script, which grabs all the changelogs from the repositories through GH APIs. |
try this: import { defineConfig } from 'vitepress';
export default defineConfig({
markdown: {
config(md) {
const orig = md.render;
md.render = function (src, env) {
if (env.relativePath === 'index.md') {
src = src.replace(/</g, '<').replace(/>/g, '>');
}
return orig.call(this, src, env);
};
},
},
}); replace index.md with whatever your file's name is |
This led me into facing another issue. xD |
Worked fine. |
I still wish if there was the frontmatter config though. |
https: //github.com/vuejs/vitepress/issues/4622 Change-Id: I917e1576ca11d187503c9c816be10dcc713df9d3
Is your feature request related to a problem? Please describe.
Currently using vitepress to render changelogs of a repository, and it has entries like:
Add <partition>/gpu support to fsgen
which leads to missing end tag.
Describe the solution you'd like
I believe adding a frontmatter config to parse elements in a MD or not, would be a good idea.
Describe alternatives you've considered
No response
Additional context
#4216
Seems to be stale, and I am not sure if this will be given any attention considering 4 months of inactivity on that issue.
Validations
The text was updated successfully, but these errors were encountered: