From e636e8ca92dbfee444e19bc016592ea56beeac9a Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Wed, 14 Jan 2026 06:41:57 -0800 Subject: [PATCH] Fix examples.md template with duplicate content outside OUTPUT blocks The template file had duplicate example content placed outside the OUTPUT:START/OUTPUT:END blocks, which caused rendering issues due to stray code fences and resulted in duplicated content after doc generation. Removed the orphaned content so only the CODE/OUTPUT block templates remain, which get properly filled during CI doc generation. --- docs/examples.md | 117 ----------------------------------------------- 1 file changed, 117 deletions(-) diff --git a/docs/examples.md b/docs/examples.md index c6c44ab..c084d48 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -12,72 +12,6 @@ Real-world examples demonstrating the power and flexibility of `markdown-code-ru Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - -``` - -After running `markdown-code-runner`: -```markdown -This is an example of a simple code block: - - - - - - Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - -``` - -### :star: Example 2: Multiple code blocks - -```markdown -Here are two code blocks: - -First code block: - - - - - - Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - -``` - - -```markdown -Second code block: - - - - - - Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - -``` - -After running `markdown-code-runner`: - -```markdown -Here are two code blocks: - -First code block: - - - - - - Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - - -Second code block: - - - - - - Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - -``` - ## Usage Ideas @@ -93,57 +27,6 @@ Second code block: Output is generated during CI build. We don't commit generated content to keep docs copyable and avoid recursion. See docs/docs_gen.py - -``` -Which is rendered as: - - - - - - - - - - -- delectus aut autem (User ID: 1, Completed: False) -- quis ut nam facilis et officia qui (User ID: 1, Completed: False) -- fugiat veniam minus (User ID: 1, Completed: False) -- et porro tempora (User ID: 1, Completed: True) -- laboriosam mollitia et enim quasi adipisci quia provident illum (User ID: 1, Completed: False) - - - - -### :crab: Idea 6: Run a Rust program - -We can use `markdown-code-runner` to write Rust code to a file and then a hidden bash code block to run the code and display the output. - -The code below *is actually executed*, check out the [`README.md` in plain text](https://github.com/basnijholt/markdown-code-runner/blob/main/README.md?plain=1) to see how this works. - -```rust markdown-code-runner filename=main.rs -fn main() { - println!("Hello, world!"); -} -``` - -Which when executed produces: - - - - - - - - - -``` -``` - - - -These are just a few examples of how you can use Markdown Code Runner to enhance your Markdown documents with dynamic content. The possibilities are endless! - ## More Ideas