aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/extensions/attr_list.py2
-rw-r--r--markdown/extensions/headerid.py4
-rw-r--r--tests/extensions/nl2br_w_attr_list.html1
-rw-r--r--tests/extensions/nl2br_w_attr_list.txt2
-rw-r--r--tests/extensions/test.cfg3
5 files changed, 9 insertions, 3 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py
index 00f92cd..3a79d85 100644
--- a/markdown/extensions/attr_list.py
+++ b/markdown/extensions/attr_list.py
@@ -130,7 +130,7 @@ class AttrListTreeprocessor(markdown.treeprocessors.Treeprocessor):
class AttrListExtension(markdown.extensions.Extension):
def extendMarkdown(self, md, md_globals):
- md.treeprocessors.add('attr_list', AttrListTreeprocessor(md), '>inline')
+ md.treeprocessors.add('attr_list', AttrListTreeprocessor(md), '>prettify')
def makeExtension(configs={}):
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 = []
diff --git a/tests/extensions/nl2br_w_attr_list.html b/tests/extensions/nl2br_w_attr_list.html
new file mode 100644
index 0000000..e5e7eb2
--- /dev/null
+++ b/tests/extensions/nl2br_w_attr_list.html
@@ -0,0 +1 @@
+<p id="bar">Foo<br /></p> \ No newline at end of file
diff --git a/tests/extensions/nl2br_w_attr_list.txt b/tests/extensions/nl2br_w_attr_list.txt
new file mode 100644
index 0000000..4b520b5
--- /dev/null
+++ b/tests/extensions/nl2br_w_attr_list.txt
@@ -0,0 +1,2 @@
+Foo
+{: #bar} \ No newline at end of file
diff --git a/tests/extensions/test.cfg b/tests/extensions/test.cfg
index ac8a747..d642bd8 100644
--- a/tests/extensions/test.cfg
+++ b/tests/extensions/test.cfg
@@ -29,3 +29,6 @@ extensions=fenced_code
[sane_lists]
extensions=sane_lists
+
+[nl2br_w_attr_list]
+extensions=nl2br,attr_list