From facfd66d5e41e03d69901fe2f4ae0e24106a21f2 Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Mon, 23 Jan 2017 20:44:40 -0700 Subject: Fix footnote parsing of footnote content (#536) Fixes #412 and #493. First we parse footnote content as its own document avoid quirks with using li as a parent. Second, we surround placeholders with STX and ETX to prevent them from interfering with inline parsing; this is also consistent with how placeholders are used everywhere else in Python Markdown. --- tests/extensions/extra/footnote.html | 26 ++++++++++++++++++++++++++ tests/extensions/extra/footnote.txt | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) (limited to 'tests') diff --git a/tests/extensions/extra/footnote.html b/tests/extensions/extra/footnote.html index 9cf42ed..4cca25c 100644 --- a/tests/extensions/extra/footnote.html +++ b/tests/extensions/extra/footnote.html @@ -3,6 +3,8 @@

Duplicate6 footnotes6 test6.

Duplicate7 footnotes7 test7.

Single after duplicates8.

+

Test emphasis at end of footnote9

+

Complex footnote content10


    @@ -41,5 +43,29 @@ Nor is third... 

    +
  1. +

    emphasis works

    +

    emphasis still works 

    +
  2. +
  3. +
      +
    1. +

      The top couple half figure, contrary sides and hands across with bottom couple,

      +

      Half figure back on your own sides, and turn partner to places,

      +

      Swing partners with right hands into straight line long-ways, as in a reel, and

      +

      Set,

      +

      Hey and return to places,

      +

      The other three couples do the same.

      +
    2. +
    3. +

      Top and bottom couples meet and set,

      +

      Then each gentleman leas the opposite lady to the couple on his left, and set,

      +

      Aach four right and left,

      +

      Swing side couples to places, and turn partners all eight,

      +

      The other two couple o the same.

      +
    4. +
    +

    +
\ No newline at end of file diff --git a/tests/extensions/extra/footnote.txt b/tests/extensions/extra/footnote.txt index f95ff2c..93b5869 100644 --- a/tests/extensions/extra/footnote.txt +++ b/tests/extensions/extra/footnote.txt @@ -8,6 +8,10 @@ Duplicate[^b] footnotes[^b] test[^b]. Single after duplicates[^c]. +Test emphasis at end of footnote[^d] + +Complex footnote content[^e] + [^1]: Footnote that ends with a list: * item 1 @@ -28,3 +32,31 @@ Nor is third... [^a]: 1 [^b]: 2 [^c]: 3 + +[^d]: + _emphasis works_ + + _emphasis still works_ + +[^e]: + 1. The top couple half figure, contrary sides and hands across with bottom couple, + + Half figure back on your own sides, and turn partner to places, + + Swing partners with right hands into straight line long-ways, as in a reel, and + + Set, + + Hey and return to places, + + The other three couples do the same. + + 2. Top and bottom couples meet and set, + + Then each gentleman leas the opposite lady to the couple on his left, and set, + + Aach four right and left, + + Swing side couples to places, and turn partners all eight, + + The other two couple o the same. -- cgit v1.2.3