diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2015-03-29 20:57:18 -0400 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2015-04-22 19:53:48 -0400 |
commit | ce5435a1e8d2186a1f4f61f7c35472e4b5d2db93 (patch) | |
tree | 26936c77e16b92eeb4344b6536b242f97834188e | |
parent | 18452b5912dc9826bb43ea7f36987c5837052607 (diff) | |
download | python-markdown-ce5435a1e8d2186a1f4f61f7c35472e4b5d2db93.tar.gz |
Removed some Python2.6- specific code.
-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 a66c5bd..4659e32 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -226,19 +226,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: @@ -247,7 +234,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) |