Permalink
Browse files

["toc" extra] Unescape Markdown special chars in TOC entries.

  • Loading branch information...
1 parent 56c586d commit 146e858b9cad3df48d58025bf5057ce0fe05071c @trentm committed Jul 18, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −0 CHANGES.md
  2. +1 −1 lib/markdown2.py
View
@@ -2,6 +2,9 @@
## python-markdown2 2.0.1 (not yet released)
+- ["toc" extra] Unescape Markdown special chars in TOC entries. See
+ <https://github.com/trentm/restdown/issues/15>.
+
- Now 'tox' testing support (by github.com/msabramo):
[sudo] pip install tox
View
@@ -1233,7 +1233,7 @@ def header_id_from_text(self, text, prefix, n):
def _toc_add_entry(self, level, id, name):
if self._toc is None:
self._toc = []
- self._toc.append((level, id, name))
+ self._toc.append((level, id, self._unescape_special_chars(name)))
_setext_h_re = re.compile(r'^(.+)[ \t]*\n(=+|-+)[ \t]*\n+', re.M)
def _setext_h_sub(self, match):

0 comments on commit 146e858

Please sign in to comment.