Skip to main content

Module builtin

Module builtin 

Source

Structs§

AssignHeadingIds
AutolinkHeadings
Anchor injector for headings.
BareUrlAutolink
Wrap bare http(s)://... substrings in Text nodes with synthesised Link nodes. Scans Paragraph, Heading, and inline emphasis containers.
CodeImport
Resolve file=path[{ranges}] directives in fenced code-block info strings, replacing the block’s body with the file contents (optionally sliced by 1-based line ranges).
ComponentPreview
Replace <ComponentPreview name="X" /> with a CodeBlock carrying the source of registry component X. registry_index is the JSON manifest; registry_root is the directory referenced paths resolve against.
ComponentSource
Resolve <ComponentSource path="..." /> JSX nodes by reading the referenced file (or directory of files) and injecting one CodeBlock child per file. The JSX wrapper stays so consumers can render Preview/Code chrome around the resolved source. PrettyCode then highlights every injected CodeBlock natively.
CopyLinkedFiles
Copy referenced asset files (image srcs and relative hrefs) into assets_dir, hash-name them via name_template, and rewrite the AST node to point at the published URL under base_url. map caches raw -> url so repeated references hash the file only once.
DisableGfm
Serialise GFM-only constructs back to plain markdown. ~~strike~~ becomes literal text, tables flatten to pipe-delimited text, task list items lose their checkbox state and become plain list items.
Emoji
Math
Render $...$ and $$...$$ math spans to MathML.
Mermaid
Pre-render mermaid diagrams to inline SVG via the external mmdc CLI (@mermaid-js/mermaid-cli).
NpmCommand
Detect npm install ..., npx create-..., and npx ... first-lines in fenced code blocks and replace them with a <PackageManagerTabs> JSX element carrying the per-pm equivalents as plain string attrs.