Skip to content

Commit b446497

Browse files
fix: mermaid gitGraph記法でマルチバイト文字を含むブランチ名がエラーになる問題を修正 (#2262)
* fix: mermaid gitGraph記法でマルチバイト文字を含むブランチ名がエラーになる問題を修正 branch, checkout, mergeのブランチ名をダブルクォートで囲むことで、 マルチバイト文字を含むブランチ名でもmermaid記法が正しく解釈されるようにした。 * format修正 (#2263) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f9401d4 commit b446497

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

dist/generate_title_description.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generate_title_description.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ export function generateTitleDescription(): {
3939
body += " commit\n";
4040
}
4141

42-
body += ` branch ${escapedHead}\n`;
43-
body += ` checkout ${escapedHead}\n`;
42+
body += ` branch "${escapedHead}"\n`;
43+
body += ` checkout "${escapedHead}"\n`;
4444
let commit = PR_TITLE_PREFIX;
4545

4646
if (commit.length > 6) {
4747
commit = commit.substring(0, 6) + "......";
4848
}
4949

5050
body += ` commit id: "${commit}"\n`;
51-
body += ` checkout ${escapedHeadRef}\n`;
52-
body += ` merge ${escapedHead}\n`;
51+
body += ` checkout "${escapedHeadRef}"\n`;
52+
body += ` merge "${escapedHead}"\n`;
5353
body += "```";
5454

5555
if (PR_NUMBER !== "") {

0 commit comments

Comments
 (0)