diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-06 14:54:58 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-06 14:54:58 -0500 |
commit | 4ff74e33a48a8c4e101d2f5e259d7b911c03d9f9 (patch) | |
tree | 13b0a3778c8edc471ecdfea4e7f4bbc2b54dcfbc /markdown/extensions/headerid.py | |
parent | fdfa88b77eff39cda4716fdb49444f5e56d144ac (diff) | |
download | markdown-4ff74e33a48a8c4e101d2f5e259d7b911c03d9f9.tar.gz markdown-4ff74e33a48a8c4e101d2f5e259d7b911c03d9f9.tar.bz2 markdown-4ff74e33a48a8c4e101d2f5e259d7b911c03d9f9.zip |
nl2br and attr_list compatability.
Fixes #177. When using both extensions, breaks (`<br>`) must have a linebreak (`\n`) after them before attr_list is run. This patch reorders the treeprocessors so that happens ('attr_list' runs after 'prettify' not before).
Also had to alter headerid extension so it runs after 'prettify' or it would run before 'attr_list' if loaded before 'attr_list' by user.
Diffstat (limited to 'markdown/extensions/headerid.py')
-rw-r--r-- | markdown/extensions/headerid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py index 1d158f9..b6a12e8 100644 --- a/markdown/extensions/headerid.py +++ b/markdown/extensions/headerid.py @@ -187,8 +187,8 @@ class HeaderIdExtension (markdown.Extension): # insert after attr_list treeprocessor md.treeprocessors.add('headerid', self.processor, '>attr_list') else: - # insert after 'inline' treeprocessor. - md.treeprocessors.add('headerid', self.processor, '>inline') + # insert after 'prettify' treeprocessor. + md.treeprocessors.add('headerid', self.processor, '>prettify') def reset(self): self.processor.IDs = [] |