mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 23:15:46 -05:00
.callout-content support
This commit is contained in:
parent
688c5484a9
commit
ac93fe31a2
@ -492,6 +492,22 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||
"data-callout-metadata": calloutMetaData,
|
||||
},
|
||||
}
|
||||
|
||||
// Add callout-content class to callout body if it has one.
|
||||
if (node.children.length > 1) {
|
||||
const contentData = node.children[1]
|
||||
node.children[1] = {
|
||||
data: {
|
||||
hProperties: {
|
||||
...(contentData.data?.hProperties ?? {}),
|
||||
className: "callout-content",
|
||||
},
|
||||
hName: "div",
|
||||
},
|
||||
type: "blockquote",
|
||||
children: [contentData],
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
transition: max-height 0.3s ease;
|
||||
box-sizing: border-box;
|
||||
|
||||
& > *:nth-child(2) {
|
||||
& > .callout-content > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user