diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-19 16:30:51 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-19 16:30:51 -0500 |
commit | 6c36687b250e404ac4f8525126b0a7b70bc7036c (patch) | |
tree | ac226b5e78f271c45124415d2b91d86f55392d18 | |
parent | 58aa01a27273d3db56a544bfc95725c4a5dd1189 (diff) | |
download | markdown-6c36687b250e404ac4f8525126b0a7b70bc7036c.tar.gz markdown-6c36687b250e404ac4f8525126b0a7b70bc7036c.tar.bz2 markdown-6c36687b250e404ac4f8525126b0a7b70bc7036c.zip |
More TOC cleanup and added tests.
-rw-r--r-- | markdown/extensions/toc.py | 4 |
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) |