Crate markdown_code_runner

Crate markdown_code_runner 

Source
Expand description

Markdown Code Runner - Automatically update Markdown files with code block output.

This crate provides functionality to execute code blocks in Markdown files and insert their output back into the document.

§Example

Add code blocks between <!-- CODE:START --> and <!-- CODE:END --> markers:

<!-- CODE:START -->
<!-- print('Hello, world!') -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
This will be replaced by the output.
<!-- OUTPUT:END -->

Or use triple backticks with the markdown-code-runner modifier:

```python markdown-code-runner
print('Hello, world!')

This will be replaced by the output.

Re-exports§

pub use executor::Language;
pub use markers::WARNING;
pub use parser::process_markdown;
pub use parser::BacktickOptions;
pub use parser::ProcessingState;
pub use parser::Section;
pub use standardize::standardize_code_fences;

Modules§

executor
Code execution for Python and Bash code blocks.
markers
Marker constants and regex patterns for markdown-code-runner.
parser
State machine for processing Markdown files.
standardize
Code fence standardization utilities.

Functions§

update_markdown_file
Update a Markdown file by executing code blocks and inserting their output.