This commit is contained in:
St.Huang 2018-08-15 17:29:43 +08:00
parent f54ca338d3
commit 09787be647
2 changed files with 4 additions and 4 deletions

View File

@ -621,7 +621,7 @@ class MdxService(LocalService):
'''
if not self.cache[self.word]:
html = ''
result = self.builder.mdx_lookup(self.word) # self.word: unicode
result = self.builder.mdx_lookup(self.word, ignorecase=True) # self.word: unicode
if result:
if result[0].upper().find(u"@@@LINK=") > -1:
# redirect to a new word behind the equal symol.
@ -689,7 +689,7 @@ class MdxService(LocalService):
shutil.copy(src_fn, savepath)
return savepath
else:
bytes_list = self.builder.mdd_lookup(filepath_in_mdx)
bytes_list = self.builder.mdd_lookup(filepath_in_mdx, ignorecase=True)
if bytes_list:
with open(savepath, 'wb') as f:
f.write(bytes_list[0])

View File

@ -627,7 +627,7 @@ class MdxService(LocalService):
'''
if not self.cache[self.word]:
html = ''
result = self.builder.mdx_lookup(self.word) # self.word: unicode
result = self.builder.mdx_lookup(self.word, ignorecase=True) # self.word: unicode
if result:
if result[0].upper().find(u"@@@LINK=") > -1:
# redirect to a new word behind the equal symol.
@ -695,7 +695,7 @@ class MdxService(LocalService):
shutil.copy(src_fn, savepath)
return savepath
else:
bytes_list = self.builder.mdd_lookup(filepath_in_mdx)
bytes_list = self.builder.mdd_lookup(filepath_in_mdx, ignorecase=True)
if bytes_list:
with open(savepath, 'wb') as f:
f.write(bytes_list[0])