weblorg
weblorg copied to clipboard
Generated heading IDs are not unique
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
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.