This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mdast from "mdast"; | |
import remarkParse from "remark-parse"; | |
import remarkStringify from "remark-stringify"; | |
import unified from "unified"; | |
import unist from "unist"; | |
import { clozeNodeType, ClozePromptNode } from "./index"; | |
// TODO: don't match clozes inside code and html blocks | |
const clozeRegexp = /^{(.+?)}/; | |
export default function clozePlugin(this: unified.Processor) { |