aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions/toc.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/extensions/toc.py')
-rw-r--r--markdown/extensions/toc.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py
index b222cb4..f884f9b 100644
--- a/markdown/extensions/toc.py
+++ b/markdown/extensions/toc.py
@@ -49,11 +49,9 @@ def stashedHTML2text(text, md):
def _html_sub(m):
""" Substitute raw html with plain text. """
try:
- raw, safe = md.htmlStash.rawHtmlBlocks[int(m.group(1))]
+ raw = md.htmlStash.rawHtmlBlocks[int(m.group(1))]
except (IndexError, TypeError): # pragma: no cover
return m.group(0)
- if md.safeMode and not safe: # pragma: no cover
- return ''
# Strip out tags and entities - leaveing text
return re.sub(r'(<[^>]+>)|(&[\#a-zA-Z0-9]+;)', '', raw)