vuepress
vuepress copied to clipboard
markdown文件解析出错
- [x] I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
第一步:在README.md文件中添加以下代码:
**<mongodb/>**
第二步:启动服务器:
yarn docs:dev # npm run docs:dev
第三步:在v1.x是浏览器控制台会报错,在v2.x是运行vite的控制台报错,如下:
vue.runtime.esm.js?2b0e:4605 [Vue warn]: Unknown custom element: <mongodb> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <V830ee068> at docs/README.md
<Content>
<Page> at node_modules/@vuepress/theme-default/components/Page.vue
<Layout> at node_modules/@vuepress/theme-default/layouts/Layout.vue
<GlobalLayout> at node_modules/@vuepress/core/lib/client/components/GlobalLayout.vue
<Root>
What is expected?
正确的是解析成:
<strong><mongodb/></strong>
What is actually happening?
实际上却解析成vue中的一个名称为“mongodb”的组件(component),导致了找不到组件而报错。
<strong><mongodb></mongodb></strong>
Other relevant information
无
如果安装了 Vue.js devtools,把他关了试一下。搞不懂为什么Vue.js devtools会影响到,官方尽快修复一下这个bug @xxq1991 @dennisreimann @duncan @aparajita @eigan
涉及到<>这种html特殊字符的文字,使用 `` 包裹