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

Fix WARNING: duplicate label #59

Open
ItsDrike opened this issue Feb 9, 2023 · 1 comment
Open

Fix WARNING: duplicate label #59

ItsDrike opened this issue Feb 9, 2023 · 1 comment

Comments

@ItsDrike
Copy link

ItsDrike commented Feb 9, 2023

When including a document that contains multiple headings with exactly the same names, such as a changelog like this:

# Version 1
## Bugfixes
- A
- B
- C

# Version 2
## Bugfixes
- A
- B
- C
## Features
- X
- Y

The h2 headings are duplicated, and so duplicate label warnings appear.

A potential solution to this could be to replicate what MyST is doing, and use placeholder ids like #id1, #id2, etc. for any such duplicate labels, to allow referencing any title easily, without any conflicts.

i.e. the final version shouldn't look like this:
image

But rather like this:
image

@ReenigneArcher
Copy link

+1, I'm also wanting to include changelog in my docs. Only solution I have found is to use

**Heading** instead of ## Heading, but it's not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants