mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(cli): should escape curly brackets in markdown (#12188)
This commit is contained in:
parent
feba5e742f
commit
2b921f6123
@ -64,6 +64,8 @@ const markdownToVue = ({
|
|||||||
let html = md.render(raw, { id });
|
let html = md.render(raw, { id });
|
||||||
html = `<div class="van-doc-markdown-body">${html}</div>`;
|
html = `<div class="van-doc-markdown-body">${html}</div>`;
|
||||||
html = markdownCardWrapper(html);
|
html = markdownCardWrapper(html);
|
||||||
|
// escape curly brackets
|
||||||
|
html = html.replace(/<code(.*?)>/g, '<code$1 v-pre>');
|
||||||
return `<template>${html}</template>`;
|
return `<template>${html}</template>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user