From a8e06b7cef5c5b0b372b9a0db0f56c4e7094e2bd Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 13 Dec 2012 14:05:33 -0500 Subject: Fixed #164. attr_list extension attribute names are now sanitized and won't crash the serealizer. --- tests/extensions/attr_list.html | 3 ++- tests/extensions/attr_list.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/extensions') diff --git a/tests/extensions/attr_list.html b/tests/extensions/attr_list.html index 1e9c182..f50cd6a 100644 --- a/tests/extensions/attr_list.html +++ b/tests/extensions/attr_list.html @@ -14,4 +14,5 @@ And a nested

No colon for compatability with Headerid ext

-

Also a codespan: {: .someclass}.

\ No newline at end of file +

Also a codespan: {: .someclass}.

+

Bad Syntax

\ No newline at end of file diff --git a/tests/extensions/attr_list.txt b/tests/extensions/attr_list.txt index d7ed274..cd7f398 100644 --- a/tests/extensions/attr_list.txt +++ b/tests/extensions/attr_list.txt @@ -33,3 +33,4 @@ Now test overrides Also a codespan: `{: .someclass}`{: .foo}. {: #the_end} +### Bad Syntax { {: #hash5 } -- cgit v1.2.3 From fdfa88b77eff39cda4716fdb49444f5e56d144ac Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 6 Feb 2013 13:42:03 -0500 Subject: Account for a paragraph that starts with a colon when processing def_lists Fixes #171. While that report provided an example of an unordered list item that started with a colon, any block that starts with a colon and has no siblings before it (paragraph as begining if document, list item, etc) all exhibit this same behavior. Following PHP Markdown Extra's lead, these are not definition items as they have no term before them. --- tests/extensions/extra/def-in-list.html | 25 +++++++++++++++++++++++++ tests/extensions/extra/def-in-list.txt | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/extensions/extra/def-in-list.html create mode 100644 tests/extensions/extra/def-in-list.txt (limited to 'tests/extensions') diff --git a/tests/extensions/extra/def-in-list.html b/tests/extensions/extra/def-in-list.html new file mode 100644 index 0000000..21cddaa --- /dev/null +++ b/tests/extensions/extra/def-in-list.html @@ -0,0 +1,25 @@ +

: a paragraph that starts with a colon

+
    +
  • A List item
  • +
  • +
    +
    A def term
    +
    A def item
    +
    a second
    +
    +
  • +
  • +
    +
    Another def term
    +
    +

    a loose item

    +
    +
    +

    a second

    +
    +
    +
  • +
  • +

    : a list item that starts with a colon

    +
  • +
\ No newline at end of file diff --git a/tests/extensions/extra/def-in-list.txt b/tests/extensions/extra/def-in-list.txt new file mode 100644 index 0000000..7a292ab --- /dev/null +++ b/tests/extensions/extra/def-in-list.txt @@ -0,0 +1,15 @@ +: a paragraph that starts with a colon + +* A List item +* + A def term + : A def item + : a second + +* Another def term + + : a loose item + + : a second + +* : a list item that starts with a colon -- cgit v1.2.3 From 4ff74e33a48a8c4e101d2f5e259d7b911c03d9f9 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 6 Feb 2013 14:54:58 -0500 Subject: nl2br and attr_list compatability. Fixes #177. When using both extensions, breaks (`
`) 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. --- tests/extensions/nl2br_w_attr_list.html | 1 + tests/extensions/nl2br_w_attr_list.txt | 2 ++ tests/extensions/test.cfg | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 tests/extensions/nl2br_w_attr_list.html create mode 100644 tests/extensions/nl2br_w_attr_list.txt (limited to 'tests/extensions') 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 @@ +

Foo

\ 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 -- cgit v1.2.3