| | |
| | | const titleContent = |
| | | match.input.slice(calloutDirective.length).trim() || capitalize(calloutType) |
| | | const titleNode: Paragraph = { |
| | | type: 'paragraph', |
| | | children: [ |
| | | {type: 'text', value: titleContent + " "}, |
| | | ...restChildren |
| | | ] |
| | | type: "paragraph", |
| | | children: [{ type: "text", value: titleContent + " " }, ...restChildren], |
| | | } |
| | | const title = mdastToHtml(titleNode) |
| | | |
| | |
| | | node.data = { |
| | | hProperties: { |
| | | ...(node.data?.hProperties ?? {}), |
| | | className: `callout ${collapse ? "is-collapsible" : ""} ${defaultState === "collapsed" ? "is-collapsed" : "" |
| | | className: `callout ${collapse ? "is-collapsible" : ""} ${ |
| | | defaultState === "collapsed" ? "is-collapsed" : "" |
| | | }`, |
| | | "data-callout": calloutType, |
| | | "data-callout-fold": collapse, |