mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 23:15:46 -05:00
Fix multiple callout members
This commit is contained in:
parent
13220c84e2
commit
75f2366fef
@ -415,7 +415,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||
}
|
||||
|
||||
// find first line and callout content
|
||||
const [firstChild, calloutContent] = node.children
|
||||
const [firstChild, ...calloutContent] = node.children
|
||||
if (firstChild.type !== "paragraph" || firstChild.children[0]?.type !== "text") {
|
||||
return
|
||||
}
|
||||
@ -498,15 +498,14 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||
const contentData: BlockContent | DefinitionContent = {
|
||||
data: {
|
||||
hProperties: {
|
||||
...(calloutContent.data?.hProperties ?? {}),
|
||||
className: "callout-content",
|
||||
},
|
||||
hName: "div",
|
||||
},
|
||||
type: "blockquote",
|
||||
children: [calloutContent],
|
||||
children: [...calloutContent],
|
||||
}
|
||||
node.children.splice(1, 1, ...[contentData])
|
||||
node.children.splice(1, Infinity, ...[contentData])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user