diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2015-03-28 20:55:21 -0400 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2018-01-11 19:04:49 -0500 |
commit | d4de20b77ae2e522fe1a5c730b426a5b60ac86f5 (patch) | |
tree | 18a15b43c0537243527957d22e0d68309ef26530 /markdown/inlinepatterns.py | |
parent | 11270135194922e0f5cfc739b69fe39f7337a0f9 (diff) | |
download | python-markdown-d4de20b77ae2e522fe1a5c730b426a5b60ac86f5.tar.gz |
Removed some Py2.4-2.6 specific code.
Diffstat (limited to 'markdown/inlinepatterns.py')
-rw-r--r-- | markdown/inlinepatterns.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 478b55f..dbb4d06 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -229,19 +229,6 @@ class Pattern(object): except KeyError: # pragma: no cover return text - def itertext(el): # pragma: no cover - ' Reimplement Element.itertext for older python versions ' - tag = el.tag - if not isinstance(tag, util.string_type) and tag is not None: - return - if el.text: - yield el.text - for e in el: - for s in itertext(e): - yield s - if e.tail: - yield e.tail - def get_stash(m): id = m.group(1) if id in stash: @@ -250,7 +237,7 @@ class Pattern(object): return value else: # An etree Element - return text content only - return ''.join(itertext(value)) + return ''.join(value.itertext()) return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text) |