This commit is contained in:
恍兮惚兮 2024-09-18 12:54:05 +08:00
parent 5837c74b43
commit b3a52231e2
2 changed files with 3 additions and 5 deletions

View File

@ -136,8 +136,7 @@ class Process:
res = reg.sub(self.vnrshareddict[context[key]]["text"], res)
for key, value in self.sorted_vnrshareddict_post:
if key in res:
res = res.replace(key, value["text"])
res = res.replace(key.lower(), value["text"])
res = re.sub(key, value["text"], res, flags=re.IGNORECASE)
return res
@staticmethod

View File

@ -1,5 +1,5 @@
from myutils.config import savehook_new_data, globalconfig
import gobject
import gobject, re
from qtsymbols import *
from myutils.utils import postusewhich
from myutils.config import get_launchpath
@ -89,6 +89,5 @@ class Process:
def process_after(self, res: str, context):
mp1 = context["zhanweifu"]
for key in mp1:
res = res.replace(key, mp1[key])
res = res.replace(key.lower(), mp1[key])
res = re.sub(key, mp1[key], res, flags=re.IGNORECASE)
return res