Update post.py

This commit is contained in:
恍兮惚兮 2024-04-13 22:45:28 +08:00
parent c2af20424a
commit 2a930393e0

View File

@ -320,12 +320,13 @@ def trymapnameofvndb(s):
namemap = savehook_new_data[exepath]["namemap"] namemap = savehook_new_data[exepath]["namemap"]
bettermap = {} bettermap = {}
for k, v in namemap.items(): for k, v in namemap.items():
spja = k.split("") for sp in ['',' ']:
spen = v.split(" ") spja = k.split(sp)
if len(spja) == len(spen) and len(spen) > 1: spen = v.split(" ")
for i in range(len(spja)): if len(spja) == len(spen) and len(spen) > 1:
if len(spja[i]) >= 2: for i in range(len(spja)):
bettermap[spja[i]] = spen[i] if len(spja[i]) >= 2:
bettermap[spja[i]] = spen[i]
for k, v in namemap.items(): for k, v in namemap.items():
s = s.replace(k, v) s = s.replace(k, v)