From 8095aeb3bde6b00be9e86d3fb748d5e7b4d4f87c Mon Sep 17 00:00:00 2001 From: mikerambil Date: Thu, 10 Jul 2025 22:51:26 -0500 Subject: [PATCH] fix: improve formatting of example code blocks in apply-diff-file.md and README generation for better readability --- contents/apply-diff-file.md | 10 +++++++--- scripts/generate-readme.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/contents/apply-diff-file.md b/contents/apply-diff-file.md index b0b8d6d..49be463 100644 --- a/contents/apply-diff-file.md +++ b/contents/apply-diff-file.md @@ -4,22 +4,25 @@ # Apply Diff File - ![Category: Patch & Diff](https://img.shields.io/badge/Category-Patch%20%26%20Diff-blue) #### Command + ```sh git apply changes.diff ``` #### Examples + - **Apply a diff file of uncommitted changes.** ```sh -git apply changes.diff``` +git apply changes.diff +``` + - **Show what would change if the diff were applied.** -```sh +````sh git apply --stat changes.diff``` @@ -32,3 +35,4 @@ git apply --stat changes.diff``` --- _Author: mike-rambil • Updated: 2024-06-10 • Tags: diff, apply, uncommitted_ +```` diff --git a/scripts/generate-readme.js b/scripts/generate-readme.js index bf8928d..f8870f5 100644 --- a/scripts/generate-readme.js +++ b/scripts/generate-readme.js @@ -97,7 +97,7 @@ function renderExamples(examples) { if (!examples || !examples.length) return ''; let out = ''; examples.forEach((ex) => { - out += `- **${ex.description || ''}**\n\n\`\`\`sh\n${ex.code}\`\`\`\n`; + out += `- **${ex.description || ''}** \n\n \`\`\`sh\n${ex.code}\`\`\`\n`; }); return renderSection('Examples', out); }