From 96432ca023e41cf6b3125faabf586db2282cad3a Mon Sep 17 00:00:00 2001 From: "St.Huang" Date: Tue, 14 Aug 2018 14:13:42 +0800 Subject: [PATCH] mdx dictionary ignore word case --- addons/fastwq/service/base.py | 4 ++-- addons21/fastwq/service/base.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/fastwq/service/base.py b/addons/fastwq/service/base.py index 643436f..b3867ab 100644 --- a/addons/fastwq/service/base.py +++ b/addons/fastwq/service/base.py @@ -576,7 +576,7 @@ class MdxService(LocalService): def _get_definition_mdx(self): """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 = "" if len(content) > 0: for c in content: @@ -587,7 +587,7 @@ class MdxService(LocalService): def _get_definition_mdd(self, word): """according to the keyword(param word) return the media file contents""" word = word.replace('/', '\\') - content = self.builder.mdd_lookup(word) + content = self.builder.mdd_lookup(word, ignorecase=True) if len(content) > 0: return [content[0]] else: diff --git a/addons21/fastwq/service/base.py b/addons21/fastwq/service/base.py index c45669e..0c2c94d 100644 --- a/addons21/fastwq/service/base.py +++ b/addons21/fastwq/service/base.py @@ -582,7 +582,7 @@ class MdxService(LocalService): def _get_definition_mdx(self): """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 = "" if len(content) > 0: for c in content: @@ -593,7 +593,7 @@ class MdxService(LocalService): def _get_definition_mdd(self, word): """according to the keyword(param word) return the media file contents""" word = word.replace('/', '\\') - content = self.builder.mdd_lookup(word) + content = self.builder.mdd_lookup(word, ignorecase=True) if len(content) > 0: return [content[0]] else: