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 @@ -50,7 +50,7 @@ def text(html):
5050 text = text .replace ('(intransitive' , '(intr.' )
5151 text = text .replace ('(transitive' , '(trans.' )
5252 text = web .decode (text )
53- return text
53+ return text . strip ()
5454
5555
5656def wikt (word ):
@@ -74,9 +74,13 @@ def wikt(word):
7474
7575 if not is_new_mode :
7676 if (mode == 'etymology' ) and ('<p>' in line ):
77- etymology = text (line )
77+ if etymology is not None :
78+ # multi-line etymologies do exist (e.g. see "mayhem")
79+ etymology += ' ' + text (line )
80+ else :
81+ etymology = text (line )
7882 # 'id="' can occur in definition lines <li> when <sup> tag is used for references;
79- # make sure those are not excluded (see e.g., abecedarian).
83+ # make sure those are not excluded (e.g. see " abecedarian" ).
8084 elif ('id="' in line ) and ('<li>' not in line ):
8185 mode = None
8286 elif (mode is not None ) and ('<li>' in line ):
You can’t perform that action at this time.
0 commit comments