Skip to content

Commit e46309f

Browse files
committed
fix(markdown-renderer): document reactivity
1 parent 46f3d79 commit e46309f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/runtime/components/ContentRendererMarkdown.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,20 @@ export default defineComponent({
7171
})
7272
}
7373
74-
return { body, debug, tags }
74+
return { debug, tags }
7575
},
7676
render (ctx: any) {
77-
const { tags, tag, value, components, body, debug } = ctx
77+
const { tags, tag, value, excerpt, components, debug } = ctx
7878
79-
if (!body) {
79+
if (!value) {
8080
return null
8181
}
8282
83+
let body = (value?.body || value) as MarkdownNode
84+
if (excerpt && value?.excerpt) {
85+
body = value.excerpt as MarkdownNode
86+
}
87+
8388
const meta: ParsedContentMeta = {
8489
...(value as ParsedContentMeta),
8590
tags: {

0 commit comments

Comments
 (0)