fix: allow formatting in callout titles
| | |
| | | --color: #customcolor; |
| | | --border: #custombordercolor; |
| | | --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 |
| | | } |
| | | } |
| | | ``` |
| | | |
| | |
| | | > [!info] |
| | | > Default title |
| | | |
| | | > [!question]+ Can callouts be nested? |
| | | > [!question]+ Can callouts be _nested_? |
| | | > |
| | | > > [!todo]- Yes!, they can. And collapsed! |
| | | > > |
| | |
| | | match.input.slice(calloutDirective.length).trim() || capitalize(calloutType) |
| | | const titleNode: Paragraph = { |
| | | type: "paragraph", |
| | | children: |
| | | restOfTitle.length === 0 |
| | | ? [{ type: "text", value: titleContent + " " }] |
| | | : restOfTitle, |
| | | children: [{ type: "text", value: titleContent + " " }, ...restOfTitle], |
| | | } |
| | | const title = mdastToHtml(titleNode) |
| | | |