mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
fix(cli): should escape curly brackets in markdown (#12188)
This commit is contained in:
@@ -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>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user