From adaa5e8d9ccf0585ccf2ef88fc1e8860bbc9b0cb 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: Sun, 26 May 2024 15:25:29 +0800 Subject: [PATCH] repair --- LunaTranslator/LunaTranslator/cishu/mdict.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/LunaTranslator/LunaTranslator/cishu/mdict.py b/LunaTranslator/LunaTranslator/cishu/mdict.py index b4ff48b8..56ebc026 100644 --- a/LunaTranslator/LunaTranslator/cishu/mdict.py +++ b/LunaTranslator/LunaTranslator/cishu/mdict.py @@ -2560,13 +2560,10 @@ class mdict(cishubase): # print(keys) for k in keys: content = index.mdx_lookup(k)[0] - while True:#あさひ - match = re.match("@@@LINK=(.*)", content.strip()) - if match: - match = match.groups()[0] - content = index.mdx_lookup(match)[0] - else: - break + match = re.match("@@@LINK=(.*)", content.strip()) + if match: + match = match.groups()[0] + content = index.mdx_lookup(match)[0] results.append(self.parseashtml(content)) except: from traceback import print_exc