fix: allow formatting in callout titles
This commit is contained in:
parent
22de92f6c4
commit
7cb1c291c8
@ -36,7 +36,8 @@ By default, custom callouts are handled by applying the `note` style. To make fa
|
|||||||
--color: #customcolor;
|
--color: #customcolor;
|
||||||
--border: #custombordercolor;
|
--border: #custombordercolor;
|
||||||
--bg: #custombg;
|
--bg: #custombg;
|
||||||
--callout-icon: url('data:image/svg+xml; utf8, <custom formatted svg>'); //SVG icon code
|
--callout-icon: url("data:image/svg+xml; utf8, <custom formatted svg>"); //SVG icon code
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ By default, custom callouts are handled by applying the `note` style. To make fa
|
|||||||
> [!info]
|
> [!info]
|
||||||
> Default title
|
> Default title
|
||||||
|
|
||||||
> [!question]+ Can callouts be nested?
|
> [!question]+ Can callouts be _nested_?
|
||||||
>
|
>
|
||||||
> > [!todo]- Yes!, they can. And collapsed!
|
> > [!todo]- Yes!, they can. And collapsed!
|
||||||
> >
|
> >
|
||||||
|
@ -387,10 +387,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
|||||||
match.input.slice(calloutDirective.length).trim() || capitalize(calloutType)
|
match.input.slice(calloutDirective.length).trim() || capitalize(calloutType)
|
||||||
const titleNode: Paragraph = {
|
const titleNode: Paragraph = {
|
||||||
type: "paragraph",
|
type: "paragraph",
|
||||||
children:
|
children: [{ type: "text", value: titleContent + " " }, ...restOfTitle],
|
||||||
restOfTitle.length === 0
|
|
||||||
? [{ type: "text", value: titleContent + " " }]
|
|
||||||
: restOfTitle,
|
|
||||||
}
|
}
|
||||||
const title = mdastToHtml(titleNode)
|
const title = mdastToHtml(titleNode)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user