diff --git a/components/markdownRender.vue b/components/markdownRender.vue index 2a0bef0..52e07d6 100644 --- a/components/markdownRender.vue +++ b/components/markdownRender.vue @@ -25,32 +25,22 @@ const VNodeArr = computed(() => { return () => [] } const renderedData = markdownIt.render(props.data) + console.log({ + renderedData + }) const h2v = new Html2VNode() h2v.use( { filter(tagName) { return tagName === 'code' }, - rander({ + render({ item, - // tagName, tagAttrs, - // middlewareMap }) { - // console.log({ - // tagName, - // tagAttrs, - // }) const codeType = tagAttrs?.class?.slice(1, -1)?.split('-')?.[1] ?? '' - // console.log({ - // codeType, - // }) // @ts-ignore const inline = (item.children[0].children.trim() as string).includes('\n') ? false : true - console.log({ - inline, - c: item.children - }) return h( codeMirror, { diff --git a/pages/posts/index.vue b/pages/posts/index.vue index 0675217..14c384a 100644 --- a/pages/posts/index.vue +++ b/pages/posts/index.vue @@ -1,6 +1,6 @@