From 9efc6318678d479c0d40fc744252e5d14d2d0093 Mon Sep 17 00:00:00 2001 From: yudai hiyama Date: Mon, 3 Feb 2025 17:41:08 +0900 Subject: [PATCH] fix --- src/components/tool/texCommon.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/tool/texCommon.ts b/src/components/tool/texCommon.ts index efe20fc..657f089 100644 --- a/src/components/tool/texCommon.ts +++ b/src/components/tool/texCommon.ts @@ -85,7 +85,9 @@ export const makeShorter = ( rawTitle.match(/^{+/)?.[0].length ?? 0, rawTitle.match(/}+$/)?.[0].length ?? 0, ); - entry.fields.title = `{${rawTitle.slice(bracketCount, -bracketCount)}}`; + if (bracketCount !== 0) { + entry.fields.title = `{${rawTitle.slice(bracketCount, -bracketCount)}}`; + } } // booktitleがあってseriesがあった場合は、booktitleをseriesにしてseriesを削除(zipMode時)