Skip to content

Footnote appears in all following objects after the first appearance #186

@anthonyhtyao

Description

@anthonyhtyao

Hi, I'm not sure this is related to pytkdocs or mkdocstrings.

Describe the bug
If a footnote is added to one of python objects, the footnote will appear in every object after that one in the same documentation page.

To Reproduce
Here is an example to reproduce

# example.py
def C():
    """This is C
    """
    pass

def B():
    """This is B[^1]

    [^1]: This is footnote
    """
    pass

def A():
    """This is A
    """
    pass
# mkdocs.yml
site_name: Footnote
theme:
  name: "material"
plugins:
  - search
  - mkdocstrings:
      default_handler: python
markdown_extensions:
  - footnotes

Expected behavior
The footnote is supposed to appear only under function B

Screenshots
However, footnote appears under function B and C


Screenshot from 2020-12-05 00-30-54

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtemplatesJinja templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions