Skip to content

Commit 9c5f83b

Browse files
committed
fix: update example code formatting in README generation to include shell code block for improved readability
1 parent 387757b commit 9c5f83b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/generate-readme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function renderExamples(examples) {
9797
if (!examples || !examples.length) return '';
9898
let out = '';
9999
examples.forEach((ex) => {
100-
out += `- **${ex.description || ''}**\n\n${ex.code}\n`;
100+
out += `- **${ex.description || ''}**\n\n\`\`\`sh\n${ex.code}\`\`\`\n`;
101101
});
102102
return renderSection('Examples', out);
103103
}

toc-source.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"command": "git request-pull <start> <url> <end>",
5858
"examples": [
5959
{
60-
"code": "\n\n```The following changes since commit 1234567... (main):\n\n Some previous commit message\n\nare available in the Git repository at:\n\n https://github.com/example/repo.git feature-branch\n\nfor you to fetch changes up to 89abcde... (feature-branch):\n\n New feature commit message\n Another commit message\n\n----------------------------------------------------------------\n file1.txt | 10 ++++++++++\n file2.js | 5 +++++\n 2 files changed, 15 insertions(+)\n```",
60+
"code": "\n\nThe following changes since commit 1234567... (main):\n\n Some previous commit message\n\nare available in the Git repository at:\n\n https://github.com/example/repo.git feature-branch\n\nfor you to fetch changes up to 89abcde... (feature-branch):\n\n New feature commit message\n Another commit message\n\n----------------------------------------------------------------\n file1.txt | 10 ++++++++++\n file2.js | 5 +++++\n 2 files changed, 15 insertions(+)\n",
6161
"description": "Generates a summary like:"
6262
},
6363
{

0 commit comments

Comments
 (0)