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

Generated heading IDs are not unique #64

Open
thecashewtrader opened this issue Apr 22, 2022 · 1 comment
Open

Generated heading IDs are not unique #64

thecashewtrader opened this issue Apr 22, 2022 · 1 comment

Comments

@thecashewtrader
Copy link
Contributor

The id generated for each heading is not unique.
Example: https://thecashewtrader.gitlab.io/braindump/antilinks
All the "Alternatives" headings have the same id i.e #alternatives

@nanzhong
Copy link
Collaborator

Are the links to the "Alternatives" headings internal links? If so, this may be undefined behaviour as looking at the org mode docs for internal links, there's explicit mention of:

Note that you must make sure custom IDs, dedicated targets, and names are unique throughout the document.

It could potentially be possible to address this by changing how the headline slugs are generated for headlines without a CUSTOM_ID by appending the :begin property value of the headline to the slug since the start position of a headline within an org document should be unique.

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