mirror of
https://github.com/mike-rambil/Advanced-Git.git
synced 2025-12-30 05:59:31 -06:00
fix: improve formatting of example code blocks in apply-diff-file.md and README generation for better readability
This commit is contained in:
@@ -4,22 +4,25 @@
|
||||
|
||||
# Apply Diff File
|
||||
|
||||
|
||||

|
||||
|
||||
#### 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_
|
||||
````
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user