import type { Extension } from 'micromark-util-types'; declare module 'micromark-util-types' { interface TokenTypeMap { markdocTag: 'markdocTag'; } } /** * Markdoc tag-span micromark extension, gated behind `ParseOptions.markdoc`. * Off by default: Liquid and Jinja templates use the identical `{% %}` * delimiter, so tokenizing it unconditionally would misinterpret non-Markdoc * documents. * * Takes the document text so both constructs can share one `%}` index over it * (see `MarkdocCloseIndex`), so a fresh extension is built per parse. * * Disabling `codeIndented` and `setextUnderline` matches how a Markdoc document * is actually compiled: Markdoc's own tokenizer unconditionally disables * indented code and setext headings for every document it parses. * * `codeIndented` is the reason a 4-space-indented `{% card %}` gets recognized * here at all -- micromark otherwise reads that line as an indented code block, * so the tag never tokenizes and its less-indented close orphans. Realm's own * `allowIndentation: true` is a separate, broader knob that strips the "4+ * spaces means code, bail out" guard from every other block rule, which is what * lets an indented `{% /card %}` terminate a paragraph and close its tag. * Removing micromark's construct gives us both of those effects at once, * because it removes the one shared indentation gate every other flow construct * is checked against. * * With `setextUnderline` disabled, a would-be underline line is no longer * resolved into a setext heading and stays ordinary paragraph text -- or, for a * run of `-`/`*`/`_`, still ends the paragraph as a `thematicBreak`, which * remains enabled. That matches Realm, which renders `Title\n=====\n` as a * paragraph containing the literal underline text and `Title\n-----\n` as a * paragraph followed by `
`. * * Both disables live inside the flag-on extension, so a flag-off parse never * sees them and stays byte-identical. The knock-on effect under the flag is * deliberate and matches the renderer: indented prose that micromark would have * hidden inside `codeIndented` becomes ordinary paragraph content, and * therefore becomes visible to the prose rules. */ export declare function markdocSyntax(content: string): Extension; //# sourceMappingURL=syntax.d.ts.map