Skip to main content

Module processor

Module processor 

Source
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§

CodeBlockDiagnostic
A diagnostic message from an external tool.
CodeBlockResult
Result of processing a single code block.
CodeBlockToolProcessor
Main processor for code block tools.
FencedCodeBlockInfo
Information about a fenced code block for processing.
FormatOutput
Result of formatting code blocks in a document.
LintOutput
Result of linting the code blocks in a document.
WriteBack
Formatted code waiting to replace the code of a block.

Enums§

DiagnosticSeverity
Severity level for diagnostics.
ProcessorError
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
content with each write-back’s code in place of its block’s code, keeping only the write-backs after which extract still reads the document as the same blocks with exactly the new code; and the indices of the blocks whose write-back was refused.