From d4c2abec9abc1779b297f86f2ec9cb4d1439033f Mon Sep 17 00:00:00 2001
From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>
Date: Thu, 24 Sep 2026 00:35:14 +0900
Subject: stamp-flow-version.py: 「最終更新」の行に text-anchor
を付け忘れていたのを修正
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
行を置き換えるときに text-anchor="end" を落としていたため、文字が右端からはみ出して「最終」しか見えなくなっていた。
3つのSVGとPDFを再生成し、右寄せで全部見えることを確認した。
---
scripts/stamp-flow-version.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
(limited to 'scripts')
diff --git a/scripts/stamp-flow-version.py b/scripts/stamp-flow-version.py
index 4a1247e..e1d3f68 100644
--- a/scripts/stamp-flow-version.py
+++ b/scripts/stamp-flow-version.py
@@ -22,8 +22,14 @@ SVGS = [
IMAGES / "ijime-judai-flow-private.svg",
]
-# 「最終更新:」の行(右上・x=1796 y=56)を丸ごと置き換える
+# 「最終更新:」の行(右上・x=1796 y=56)を丸ごと置き換える。
+# text-anchor="end" を忘れると、右端からはみ出して見えなくなるので注意
LINE_RE = re.compile(r']*>.*?')
+LINE_TAG = (
+ ''
+)
REIWA_START = 2019 # 令和元年
@@ -54,12 +60,7 @@ def main():
label = f"最終更新:{reiwa(last_change_date())}"
for svg in SVGS:
text = svg.read_text(encoding="utf-8")
- new, n = LINE_RE.subn(
- f'{label}',
- text,
- )
+ new, n = LINE_RE.subn(LINE_TAG + label + "", text)
if n != 1:
raise SystemExit(f"{svg}: 「最終更新」の行が {n} 箇所(1箇所のはず)")
if new != text:
--
cgit v1.3.1