From 8afeaafcb06c07058e1f296e3d3867048c01d18c Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Mon, 23 Jan 2017 12:31:41 -0700 Subject: Create additional references for duplicate footnotes (#534) Track when we find duplicate footnote references and create unique ids for them. Then add an additional tree-processor after inline to go back and update the footnotes with additional back references that link to the duplicate footnote references. Fixes #468. --- tests/extensions/extra/footnote.html | 12 ++++++++++++ tests/extensions/extra/footnote.txt | 10 ++++++++++ 2 files changed, 22 insertions(+) (limited to 'tests') diff --git a/tests/extensions/extra/footnote.html b/tests/extensions/extra/footnote.html index e5b41a7..9cf42ed 100644 --- a/tests/extensions/extra/footnote.html +++ b/tests/extensions/extra/footnote.html @@ -1,5 +1,8 @@

This is the body with a footnote1 or two2 or more3 4 5.

Also a reference that does not exist[^6].

+

Duplicate6 footnotes6 test6.

+

Duplicate7 footnotes7 test7.

+

Single after duplicates8.


    @@ -29,5 +32,14 @@ Second line of first paragraph is not intended. Nor is third... 

    +
  1. +

    +
  2. +
  3. +

    +
  4. +
  5. +

    +
\ No newline at end of file diff --git a/tests/extensions/extra/footnote.txt b/tests/extensions/extra/footnote.txt index c5c1c92..f95ff2c 100644 --- a/tests/extensions/extra/footnote.txt +++ b/tests/extensions/extra/footnote.txt @@ -2,6 +2,12 @@ This is the body with a footnote[^1] or two[^2] or more[^3] [^4] [^5]. Also a reference that does not exist[^6]. +Duplicate[^a] footnotes[^a] test[^a]. + +Duplicate[^b] footnotes[^b] test[^b]. + +Single after duplicates[^c]. + [^1]: Footnote that ends with a list: * item 1 @@ -18,3 +24,7 @@ Also a reference that does not exist[^6]. [^5]: First line of first paragraph. Second line of first paragraph is not intended. Nor is third... + +[^a]: 1 +[^b]: 2 +[^c]: 3 -- cgit v1.2.3