Expand description
Main processor for code block linting and formatting.
This module coordinates language resolution, tool lookup, execution, and result collection for processing code blocks in markdown files.
Structs§
- Code
Block Diagnostic - A diagnostic message from an external tool.
- Code
Block Result - Result of processing a single code block.
- Code
Block Tool Processor - Main processor for code block tools.
- Fenced
Code Block Info - Information about a fenced code block for processing.
- Format
Output - Result of formatting code blocks in a document.
- Lint
Output - Result of linting the code blocks in a document.
- Write
Back - Formatted code waiting to replace the code of a block.
Enums§
- Diagnostic
Severity - Severity level for diagnostics.
- Processor
Error - Error during code block processing.
Constants§
- CODE_
BLOCK_ TOOLS_ DIAGNOSTIC_ NAME - The name a failure of the code-block-tools machinery itself is reported under.
- RUMDL_
BUILTIN_ TOOL - Special built-in tool name for rumdl’s own markdown linting. When this tool is configured for markdown blocks, the processor skips external execution since it’s handled by embedded markdown linting.
Functions§
- extract_
fenced_ code_ blocks - Every fenced code block CommonMark sees in
content, in document order, inside containers included. - is_
rumdl_ builtin - Embedded Markdown tools are handled in-process, never as external commands.
- write_
back_ verified contentwith each write-back’s code in place of its block’s code, keeping only the write-backs after whichextractstill reads the document as the same blocks with exactly the new code; and the indices of the blocks whose write-back was refused.