Skip to content

Duplicate footnote names cause incorrect rendering and numbering #2649

Closed
@ehuss

Description

@ehuss

Problem

When there are duplicate footnote definitions, it can cause the numbering to be off and generally cause confusion.

Steps

Example page:

# Chapter 1

Test[^example]

Something else[^other]

Test2[^example]

[^example]: Definition one

[^other]: Other

[^example]: Definition two

This renders as:

Image

Several problems:

  • The second example definition shows up, but nothing links to it.
  • The "Something else" footnote number is 2, but clicking it takes you to footnote 3.

Possible Solution(s)

Should probably warn if there are duplicate footnote definitions, and ignore/delete subsequent duplicates.

Notes

mdbook v0.4.48

Version


Metadata

Metadata

Labels

A-footnotesArea: footnotesC-bugCategory: A bug, incorrect or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions