v1.0.0
Release Notes
markdown-code-runner v1.0.0
We are excited to announce the first release of markdown-code-runner! This Python module automatically executes code blocks within a Markdown file and updates the output in-place. This release includes the following features and improvements:
Features
- Parse Markdown files and detect code blocks marked with
<!-- START_CODE -->and<!-- END_CODE -->. - Execute Python code within the detected code blocks.
- Insert the output of the executed code blocks into the Markdown file, replacing the content between
<!-- START_OUTPUT -->and<!-- END_OUTPUT -->markers. - Optionally, use a
<!-- SKIP -->marker to skip the execution of a specific code block and keep the original output. - Retain the formatting of the original Markdown file, including comments and other non-code elements.
- The main function,
process_markdown, takes a list of Markdown-formatted strings as input and returns a modified list of Markdown-formatted strings with code block output inserted.
Bug Fixes
- Fixed issues with handling the output of code blocks that were skipped using the
<!-- SKIP -->marker. - Improved error handling and added informative error messages for various edge cases.
Testing
- Comprehensive test suite covering various use cases and edge cases.
- Test case for the new
<!-- SKIP -->marker functionality.
We hope you find markdown-code-runner useful for your projects involving code execution within Markdown files. We look forward to your feedback and suggestions for future improvements!