File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -226,19 +226,6 @@ def unescape(self, text):
226
226
except KeyError : # pragma: no cover
227
227
return text
228
228
229
- def itertext (el ): # pragma: no cover
230
- ' Reimplement Element.itertext for older python versions '
231
- tag = el .tag
232
- if not isinstance (tag , util .string_type ) and tag is not None :
233
- return
234
- if el .text :
235
- yield el .text
236
- for e in el :
237
- for s in itertext (e ):
238
- yield s
239
- if e .tail :
240
- yield e .tail
241
-
242
229
def get_stash (m ):
243
230
id = m .group (1 )
244
231
if id in stash :
@@ -247,7 +234,7 @@ def get_stash(m):
247
234
return value
248
235
else :
249
236
# An etree Element - return text content only
250
- return '' .join (itertext (value ))
237
+ return '' .join (value . itertext ())
251
238
return util .INLINE_PLACEHOLDER_RE .sub (get_stash , text )
252
239
253
240
You can’t perform that action at this time.
0 commit comments