From 62af18826e15e4d5e31daa7cdf02ccd8d4d456f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:03:58 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/hiraparse/latin.py | 2 +- LunaTranslator/LunaTranslator/rendertext/webview.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LunaTranslator/LunaTranslator/hiraparse/latin.py b/LunaTranslator/LunaTranslator/hiraparse/latin.py index 2d76832c..2442865f 100644 --- a/LunaTranslator/LunaTranslator/hiraparse/latin.py +++ b/LunaTranslator/LunaTranslator/hiraparse/latin.py @@ -36,6 +36,6 @@ class latin(basehira): if c in punctuations: _x.append({"orig": c, "hira": "", "isdeli": True}) else: - _x.append({"orig": c, "hira": ""}) + _x.append({"orig": c, "hira": c}) return _x diff --git a/LunaTranslator/LunaTranslator/rendertext/webview.html b/LunaTranslator/LunaTranslator/rendertext/webview.html index 80733a12..53512a2d 100644 --- a/LunaTranslator/LunaTranslator/rendertext/webview.html +++ b/LunaTranslator/LunaTranslator/rendertext/webview.html @@ -265,7 +265,7 @@ tag.forEach(word => { let eleori = dispatch_text_style_inlineblock(style, styleargs, word.orig, { atcenter: true, fontFamily: fmori, fontSize: fsori, bold: boldori, color: color, lineHeight: line_height }) - if ((isshow_fenci || isfenciclick) && word.hira) { + if ((isshow_fenci || isfenciclick) && word.hira.trim().length) { let div = document.createElement('div') div.style.display = 'inline-block' div.id = _simpleuid()