aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-06 14:54:58 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-06 14:54:58 -0500
commit4ff74e33a48a8c4e101d2f5e259d7b911c03d9f9 (patch)
tree13b0a3778c8edc471ecdfea4e7f4bbc2b54dcfbc /tests
parentfdfa88b77eff39cda4716fdb49444f5e56d144ac (diff)
downloadmarkdown-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 'tests')
-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
3 files changed, 6 insertions, 0 deletions
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