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

Add a warning if a heading title is used in multiple places #35

Closed
samvanstroud opened this issue Nov 3, 2023 · 5 comments
Closed

Add a warning if a heading title is used in multiple places #35

samvanstroud opened this issue Nov 3, 2023 · 5 comments

Comments

@samvanstroud
Copy link

This should cause mkdocs build -s to fail.

pawamoy added a commit that referenced this issue Feb 27, 2024
Replaces-PR-#20: #20
Related-to-issue-#25: #25
Related-to-issue-#35: #35
Co-authored-by: Oleh Prypin <[email protected]>
Co-authored-by: tvdboom <[email protected]>
@pawamoy
Copy link
Member

pawamoy commented Feb 27, 2024

Hi @samvanstroud, we just merged #39, which allows to define unique aliases pointing to specific headings. I believe this solves the issue described here (headings appearing in multiple places): since we can now define unique aliases, duplicated headings pose no issue and shouldn't emit warnings.

@pawamoy pawamoy closed this as completed Feb 27, 2024
@samvanstroud
Copy link
Author

Hi @pawamoy, thanks for the feature! This is great.

What happens if aliases are not defined but multiple headings exist? i.e. in the case that the user either 1) doesn't know that a title is being multiply defined or 2) doesn't know about this feature. In that case I think a warning should still be emitted.

@pawamoy
Copy link
Member

pawamoy commented Feb 27, 2024

OK let me reopen. It might be possible to detect when a heading is used multiple times while not having a unique alias pointing at each occurrence.

@pawamoy pawamoy reopened this Feb 27, 2024
@beilm
Copy link
Contributor

beilm commented Jul 4, 2024

I had the same problem and made a PR. Maybe that will help here too?
#50

pawamoy added a commit that referenced this issue Jul 5, 2024
Issue-35: #35
PR-50: #50
Co-authored-by: Timothée Mazzucotelli <[email protected]>
@pawamoy pawamoy closed this as completed Jul 5, 2024
@pawamoy
Copy link
Member

pawamoy commented Jul 5, 2024

Thanks again @beilm!

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

3 participants