aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-19 16:30:51 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-19 16:30:51 -0500
commit6c36687b250e404ac4f8525126b0a7b70bc7036c (patch)
treeac226b5e78f271c45124415d2b91d86f55392d18
parent58aa01a27273d3db56a544bfc95725c4a5dd1189 (diff)
downloadmarkdown-6c36687b250e404ac4f8525126b0a7b70bc7036c.tar.gz
markdown-6c36687b250e404ac4f8525126b0a7b70bc7036c.tar.bz2
markdown-6c36687b250e404ac4f8525126b0a7b70bc7036c.zip
More TOC cleanup and added tests.
-rw-r--r--markdown/extensions/toc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py
index e31aa2b..7edc0cc 100644
--- a/markdown/extensions/toc.py
+++ b/markdown/extensions/toc.py
@@ -172,10 +172,10 @@ class TocTreeprocessor(markdown.treeprocessors.Treeprocessor):
toc_list_nested = order_toc_list(toc_list)
self.build_toc_etree(div, toc_list_nested)
+ prettify = self.markdown.treeprocessors.get('prettify')
+ if prettify: prettify.run(div)
if not marker_found:
# serialize and attach to markdown instance.
- prettify = self.markdown.treeprocessors.get('prettify')
- if prettify: prettify.run(div)
toc = self.markdown.serializer(div)
for pp in self.markdown.postprocessors.values():
toc = pp.run(toc)