import type { BlockContext, BlockParser, Line, MarkdownConfig, } from "@lezer/markdown"; // CommonMark spec ยง4.6 โ€” the same block-level element names that // the built-in lezer HTMLBlock parser recognises (type 6). const blockTagRe = /^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i; // Type 1: