# Second occurrence of inline expansion footnote cannot be expanded

**URL:** https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449
**Category:** Bug
**Created:** [November 26, 2020, 11:17pm UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449 "2020-11-26T23:17:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![alxsal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alxsal/32/119855_2.png) [@alxsal](https://meta.discourse.org/u/alxsal)
#### Post date: [November 26, 2020, 11:17pm UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449/1 "2020-11-26T23:17:35Z")

</div>

Using the footnote plugin v0.1 with settings “enable markdown footnotes” and “display footnotes inline” enabled on discourse 2.6.0 beta6 (66ecefba52) :

- when the same inline footnote is used 2 times in a post, the first one can be clicked and expands to show the footnote, but the second does not (nor does the third…).
- reproduced on my site with the minimal example provided on the Discourse footnote post :

> We are our choices. \[1\]  
> A lot of interesting words  
> He really said it. \[1:1\]

- Tried to reproduce on [try.discourse.org](http://try.discourse.org) but the footnote plugin does not seem available

Can someone reproduce as well or is there a problem with my site ?

* * *

1. We are our choices.  
Sartre, some time  
some day  
in the past

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [November 27, 2020, 12:24am UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449/2 "2020-11-27T00:24:49Z")

</div>

> [@alxsal](#):
>
> reproduced on my site with the minimal example provided on the Discourse footnote post

I’ve tested that example on my local dev site (running the latest Discourse code with the Chrome browser.) I’m finding that the second footnote is positioned either at the bottom of the page, or off the page.

If I try inserting a unique footnote between the two duplicate footnotes, the second of the duplicate footnotes will display the content of the unique footnote if it is clicked after having clicked the unique footnote. Example markup for that issue:

```plaintext
We are our choices. [^sartre]

A lot of interesting words

Second footnote test [^second]

He really said it. [^sartre]

[^sartre]: We are our choices.
Sartre, some time
some day
in the past

[^second]: this is the content of the second footnote

```

---

<div class="post-metadata">

### Author: ![jbrains](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jbrains/32/208183_2.png) [@jbrains](https://meta.discourse.org/u/jbrains)
#### Post date: [November 15, 2021, 5:49pm UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449/3 "2021-11-15T17:49:15Z")

</div>

I ran into this today, by trying to be humorous.\[1\]

* * *

1. You can read this, but you can’t expand this\[2\]. 

2. What a pity! This is hilarious.

---

<div class="post-metadata">

### Author: ![jbrains](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jbrains/32/208183_2.png) [@jbrains](https://meta.discourse.org/u/jbrains)
#### Post date: [November 15, 2021, 5:50pm UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449/4 "2021-11-15T17:50:42Z")

</div>

I guess this Discourse doesn’t use the footnote plugin.

So… I infer that it’s up to me if I want this to work. Is that so? Can anyone give me a leg up?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 16, 2021, 6:41am UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449/5 "2021-11-16T06:41:35Z")

</div>

First step is figuring out if it works here:

[https://github.com/markdown-it/markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote)

We are simply repackaging it, it is possible it is already improved in the latest release.

---

<div class="post-metadata">

### Author: ![jbrains](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jbrains/32/208183_2.png) [@jbrains](https://meta.discourse.org/u/jbrains)
#### Post date: [February 10, 2022, 5:43pm UTC](https://meta.discourse.org/t/second-occurrence-of-inline-expansion-footnote-cannot-be-expanded/171449/6 "2022-02-10T17:43:56Z")

</div>

I finally had time to look into this. Thank you for the suggestion.

`markdown-it` and `markdown-it-footnote` behave as I’d expect. I confirmed this with some simple unit tests.

The problem seems to arise when I try to click on the footnote in a topic. Here is what it’s like for me.

First, I try to click the “…” in the nested footnote, which reloads the page; then I try to click the “[2]” link in the nested footnote, for which there is no corresponding HTML anchor.

What can I do about this?

Many thanks.
