From 3978ce84a9f34935800590dc5a1c60f5be21a6ad Mon Sep 17 00:00:00 2001 From: Gakuto1112 Date: Wed, 10 Jul 2024 00:18:09 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=A1=E3=82=83=E3=82=93=E3=81=A8=E3=82=AD?= =?UTF-8?q?=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=82=92=E8=BF=94=E3=81=99?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../readme_generator/src/fbac_readme_generator.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/readme_generator/src/fbac_readme_generator.ts b/.github/readme_generator/src/fbac_readme_generator.ts index 021d5694..5d3f60f7 100644 --- a/.github/readme_generator/src/fbac_readme_generator.ts +++ b/.github/readme_generator/src/fbac_readme_generator.ts @@ -57,8 +57,10 @@ class FBACReadmeGenerator extends ReadmeGenerator { protected onInjectTagFound(tagName: string, fileLanguage: FileLanguage): string { let text: string = super.onInjectTagFound(tagName, fileLanguage); - if(tagName == "creation_status" && this.caches[`${tagName}_${fileLanguage}`] == undefined) { - if(fs.existsSync("./src/creation_status.json")) { + console.log(tagName); + if(tagName == "creation_status") { + if(this.caches[`${tagName}_${fileLanguage}`] != undefined) return this.caches[`${tagName}_${fileLanguage}`]; + else if(fs.existsSync("./src/creation_status.json")) { try { let characterData: CreationStatusData = JSON.parse(fs.readFileSync("./src/creation_status.json", {encoding: "utf-8"})); if(fs.existsSync(`../README_templates/creation_status/done/${fileLanguage}.md`)) text = fs.readFileSync(`../README_templates/creation_status/done/${fileLanguage}.md`, {encoding: "utf-8"}); @@ -112,16 +114,13 @@ class FBACReadmeGenerator extends ReadmeGenerator { text = text.substring(0, text.length - 1); } else text += `${fileLanguage == "en" ? "(There is no avatar planned to be created.)" : "(作成予定のアバターはありません。)"}`; + this.caches[`${tagName}_${fileLanguage}`] = text; } catch { - return "\n"; + text = "\n"; } } - else { - return "\n"; - } - - this.caches[`${tagName}_${fileLanguage}`] = text; + else text = "\n"; } return text; }