Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: variable head should not be set to empty after assignment #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions dictutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,17 +885,14 @@ def get_memo (self, data):
youci = youci[p1 + 5:]
if youci:
head = u'<span class="head">【优词】 </span> '
head = ''
output.append(head + youci)
xdf = detail.get('xdf')
if xdf:
head = u'<span class="head">【新东方】 </span>'
head = ''
output.append(head + xdf)
bzsd = detail.get('bzsd')
if bzsd:
head = u'<span class="head">【不择手段】 </span>'
head = ''
output.append(head + self.text2html(bzsd))
if not output:
return None
Expand All @@ -909,12 +906,10 @@ def get_extra (self, data):
resemble = detail.get('resemble')
if resemble:
head = u'<span class="head">【有道词语辨析】</div><br>\n'
head = ''
output.append(head + resemble)
syno = detail.get('syno')
if syno:
head = u'<span class="head">【有道近义词】</div><br>\n'
head = ''
output.append(head + self.get_syno(data))
if not output:
return None
Expand Down