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

Open
samvanstroud opened this issue Nov 3, 2023 · 3 comments
Open

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

samvanstroud opened this issue Nov 3, 2023 · 3 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 <oleh@pryp.in>
Co-authored-by: tvdboom <m.524687@gmail.com>
@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
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