md添加hightlight支持。
This commit is contained in:
1 parent
63206e71b8
commit
72ba1691fb
6 files changed
+391
-24
No files matched your search
@@ -33,15 +33,24 @@ const VNodeArr = computed(() => {
|
||||
},
|
||||
rander({
|
||||
item,
|
||||
tagName,
|
||||
// tagName,
|
||||
tagAttrs,
|
||||
middlewareMap
|
||||
// middlewareMap
|
||||
}) {
|
||||
// console.log({
|
||||
// tagName,
|
||||
// tagAttrs,
|
||||
// })
|
||||
const codeType = tagAttrs?.class?.slice(1, -1)?.split('-')?.[1] ?? ''
|
||||
// console.log({
|
||||
// codeType,
|
||||
// })
|
||||
return h(
|
||||
codeMirror,
|
||||
{
|
||||
// @ts-ignore
|
||||
data: (item.children[0].children as string).replaceAll('<', '<').replaceAll('>', '>'),
|
||||
data: item.children[0].children.trim(),
|
||||
type: codeType,
|
||||
},
|
||||
)
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user