import type { BlockPlugin, HmmBlock, HmmOptions } from "../types.ts"; import { renderNode } from "../render.ts"; const REGEXP = /^\d+\.\s+/; /** * @todo Handle nested and indented lists */ const plugin: BlockPlugin = { type: "orderedList", multiline: true, matchStart: (line: string, index: number): boolean => { if (index > 0 && /^\s{4}[^\s]/.test(line)) return true; return REGEXP.test(line); }, render: (block: HmmBlock, options: HmmOptions) => { block.render = "