| | |
| | | } |
| | | |
| | | tag = slugTag(tag) |
| | | if (file.data.frontmatter?.tags?.includes(tag)) { |
| | | file.data.frontmatter.tags.push(tag) |
| | | if (file.data.frontmatter) { |
| | | const noteTags = file.data.frontmatter.tags ?? [] |
| | | file.data.frontmatter.tags = [...new Set([...noteTags, tag])] |
| | | } |
| | | |
| | | return { |
| | |
| | | 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) |
| | | |