Something went wrong. Try again.
🌿 Collaborative wiki on ATProto forked from juprodh.me/lichen.wiki
Something went wrong. Try again.
123456789101112import type { MarkdownIt } from "markdown-it";import { stripFrontmatter } from "../frontmatter.ts";
// Without this a pasted Obsidian note renders its properties as <hr> + a setext <h2>.// Stripping the source before tokenization keeps one definition of "what frontmatter is",// shared with extractHeadings.export function frontmatterPlugin(mdi: MarkdownIt): void { mdi.core.ruler.after("normalize", "frontmatter", (state) => { state.src = stripFrontmatter(state.src); });}