diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2013-09-29 19:20:59 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2013-09-29 19:21:10 +0400 |
commit | 635d2f71db191145d30cba4934ab7fa8f4d20509 (patch) | |
tree | b42f96cbb995067e6552858c3906198405e4e86f /markdown | |
parent | 6efe75869ac7ab60ccadc0a9c4ac64f9a7722379 (diff) | |
download | markdown-635d2f71db191145d30cba4934ab7fa8f4d20509.tar.gz markdown-635d2f71db191145d30cba4934ab7fa8f4d20509.tar.bz2 markdown-635d2f71db191145d30cba4934ab7fa8f4d20509.zip |
toc: insert `¶` instead of raw unicode character
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/extensions/toc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py index eba0e69..89468d6 100644 --- a/markdown/extensions/toc.py +++ b/markdown/extensions/toc.py @@ -13,7 +13,7 @@ from __future__ import absolute_import from __future__ import unicode_literals from . import Extension from ..treeprocessors import Treeprocessor -from ..util import etree, parseBoolValue +from ..util import etree, parseBoolValue, AMP_SUBSTITUTE from .headerid import slugify, unique, itertext, stashedHTML2text import re @@ -101,8 +101,8 @@ class TocTreeprocessor(Treeprocessor): def add_permalink(self, c, elem_id): permalink = etree.Element("a") - permalink.text = ("\xb6" if self.use_permalinks is True - else self.use_permalinks) + permalink.text = ("%spara;" % AMP_SUBSTITUTE + if self.use_permalinks is True else self.use_permalinks) permalink.attrib["href"] = "#" + elem_id permalink.attrib["class"] = "headerlink" permalink.attrib["title"] = "Permanent link" |