diff --git a/src/callout/manager.ts b/src/callout/manager.ts index 34cdb06..1e5b098 100644 --- a/src/callout/manager.ts +++ b/src/callout/manager.ts @@ -49,11 +49,6 @@ export default class CalloutManager extends Component { calloutProcessor(el: HTMLElement, ctx: MarkdownPostProcessorContext) { const callout = el?.querySelector(".callout"); if (!callout) return; - - const type = callout.dataset.callout; - const admonition = this.plugin.data.userAdmonitions[type]; - if (!admonition) return; - //apply metadata const section = ctx.getSectionInfo(el); if (section) { @@ -66,6 +61,10 @@ export default class CalloutManager extends Component { } } + const type = callout.dataset.callout; + const admonition = this.plugin.data.userAdmonitions[type]; + if (!admonition) return; + const titleEl = callout.querySelector(".callout-title"); const content = callout.querySelector(".callout-content");