mdx dictionary ignore word case
This commit is contained in:
parent
c93982edfd
commit
96432ca023
@ -576,7 +576,7 @@ class MdxService(LocalService):
|
|||||||
|
|
||||||
def _get_definition_mdx(self):
|
def _get_definition_mdx(self):
|
||||||
"""according to the word return mdx dictionary page"""
|
"""according to the word return mdx dictionary page"""
|
||||||
content = self.builder.mdx_lookup(self.word)
|
content = self.builder.mdx_lookup(self.word, ignorecase=True)
|
||||||
str_content = ""
|
str_content = ""
|
||||||
if len(content) > 0:
|
if len(content) > 0:
|
||||||
for c in content:
|
for c in content:
|
||||||
@ -587,7 +587,7 @@ class MdxService(LocalService):
|
|||||||
def _get_definition_mdd(self, word):
|
def _get_definition_mdd(self, word):
|
||||||
"""according to the keyword(param word) return the media file contents"""
|
"""according to the keyword(param word) return the media file contents"""
|
||||||
word = word.replace('/', '\\')
|
word = word.replace('/', '\\')
|
||||||
content = self.builder.mdd_lookup(word)
|
content = self.builder.mdd_lookup(word, ignorecase=True)
|
||||||
if len(content) > 0:
|
if len(content) > 0:
|
||||||
return [content[0]]
|
return [content[0]]
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -582,7 +582,7 @@ class MdxService(LocalService):
|
|||||||
|
|
||||||
def _get_definition_mdx(self):
|
def _get_definition_mdx(self):
|
||||||
"""according to the word return mdx dictionary page"""
|
"""according to the word return mdx dictionary page"""
|
||||||
content = self.builder.mdx_lookup(self.word)
|
content = self.builder.mdx_lookup(self.word, ignorecase=True)
|
||||||
str_content = ""
|
str_content = ""
|
||||||
if len(content) > 0:
|
if len(content) > 0:
|
||||||
for c in content:
|
for c in content:
|
||||||
@ -593,7 +593,7 @@ class MdxService(LocalService):
|
|||||||
def _get_definition_mdd(self, word):
|
def _get_definition_mdd(self, word):
|
||||||
"""according to the keyword(param word) return the media file contents"""
|
"""according to the keyword(param word) return the media file contents"""
|
||||||
word = word.replace('/', '\\')
|
word = word.replace('/', '\\')
|
||||||
content = self.builder.mdd_lookup(word)
|
content = self.builder.mdd_lookup(word, ignorecase=True)
|
||||||
if len(content) > 0:
|
if len(content) > 0:
|
||||||
return [content[0]]
|
return [content[0]]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user