File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def text(html):
4949 text = text .replace ('(intransitive' , '(intr.' )
5050 text = text .replace ('(transitive' , '(trans.' )
5151 text = web .decode (text )
52- return text
52+ return text . strip ()
5353
5454
5555def wikt (word ):
@@ -73,9 +73,13 @@ def wikt(word):
7373
7474 if not is_new_mode :
7575 if (mode == 'etymology' ) and ('<p>' in line ):
76- etymology = text (line )
76+ if etymology is not None :
77+ # multi-line etymologies do exist (e.g. see "mayhem")
78+ etymology += ' ' + text (line )
79+ else :
80+ etymology = text (line )
7781 # 'id="' can occur in definition lines <li> when <sup> tag is used for references;
78- # make sure those are not excluded (see e.g., abecedarian).
82+ # make sure those are not excluded (e.g. see " abecedarian" ).
7983 elif ('id="' in line ) and ('<li>' not in line ):
8084 mode = None
8185 elif (mode is not None ) and ('<li>' in line ):
You can’t perform that action at this time.
0 commit comments