fix: avoid unexpected vite define replacements in markdown content

pull/198/head
Evan You 4 years ago
parent 8769b4b49f
commit a41928ef83

@ -33,7 +33,12 @@ export function createMarkdownToVueRenderFn(
const start = Date.now()
const { content, data: frontmatter } = matter(src)
const { html, data } = md.render(content)
let { html, data } = md.render(content)
// avoid env variables being replaced by vite
html = html
.replace(/import\.meta/g, 'import.<wbr/>meta')
.replace(/process\.env/g, 'process.<wbr/>env')
// TODO validate data.links?
const pageData: PageData = {

Loading…
Cancel
Save