diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2016-03-17 13:36:27 -0400 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2016-03-17 13:36:27 -0400 |
commit | 8eed88621d0bae57f8e72a795c70367e88161f89 (patch) | |
tree | 7ebeec737ba40971295aa31b49ca97cb5aef65c9 /markdown | |
parent | 08d81b0e1e38b7662d4a8837c1b6a229b7082482 (diff) | |
parent | 803ab63609d6a148b01d6afc12f841501a5fd84c (diff) | |
download | markdown-8eed88621d0bae57f8e72a795c70367e88161f89.tar.gz markdown-8eed88621d0bae57f8e72a795c70367e88161f89.tar.bz2 markdown-8eed88621d0bae57f8e72a795c70367e88161f89.zip |
Merge pull request #462 from waylan/toc_bug
Toc bug
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/extensions/toc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py index b3cf898..56db33c 100644 --- a/markdown/extensions/toc.py +++ b/markdown/extensions/toc.py @@ -180,7 +180,8 @@ class TocTreeprocessor(Treeprocessor): c.text = "" for elem in c: anchor.append(elem) - c.remove(elem) + while c: + c.remove(c[0]) c.append(anchor) def add_permalink(self, c, elem_id): |