Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When footnote is referenced twice the backlink points to multiple targets #75

Open
RobertDober opened this issue Dec 14, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@RobertDober
Copy link
Owner

hello[^1] world[^1]
       
[^1]: A common greeting

produces the following

 [
   {"p", [],
    [
      "hello",
      {"a",
       [
         {"href", "#fn:1"},
         {"id", "fnref:1"},
         {"class", "footnote"},
         {"title", "see footnote"}
       ], ["1"], %{}},
      " world",
      {"a",
       [
         {"href", "#fn:1"},
         {"id", "fnref:1"},
         {"class", "footnote"},
         {"title", "see footnote"}
       ], ["1"], %{}}
    ], %{}},
   {"div", [{"class", "footnotes"}],
    [
      {"hr", [], [], %{}},
      {"ol", [],
       [
         {"li", [{"id", "fn:1"}],
          [
            {"a",
             [
               {"class", "reversefootnote"},
               {"href", "#fnref:1"},
               {"title", "return to article"}
             ], ["↩"], %{}},
            {"p", [], ["A common greeting"], %{}}
          ], %{}}
       ], %{}}
    ], %{}}
 ]
@RobertDober
Copy link
Owner Author

Fix

we need to number all the fnref:x uniquely and add them as target to the link's definition (then we can add backlinks for all of them)

Implementation Detail

Context.referenced_footnote_ids will change from a MapSet to a Map(footnote_id, list(fnrefs))

@RobertDober RobertDober self-assigned this Dec 14, 2021
@RobertDober RobertDober added the enhancement New feature or request label Dec 14, 2021
@RobertDober RobertDober added this to the 1.5.1 milestone Dec 14, 2021
@RobertDober RobertDober modified the milestones: 1.5.1, 1.5.2 Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant