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"]
bettermap = {}
for k, v in namemap.items():
spja = k.split("")
spen = v.split(" ")
if len(spja) == len(spen) and len(spen) > 1:
for i in range(len(spja)):
if len(spja[i]) >= 2:
bettermap[spja[i]] = spen[i]
for sp in ['',' ']:
spja = k.split(sp)
spen = v.split(" ")
if len(spja) == len(spen) and len(spen) > 1:
for i in range(len(spja)):
if len(spja[i]) >= 2:
bettermap[spja[i]] = spen[i]
for k, v in namemap.items():
s = s.replace(k, v)