mystmd
mystmd copied to clipboard
Disallow repeated labels
Currently, if a label is repeated in the source content, MyST raises a warning but keeps the repeated label. This leads to non-deterministic cross-reference resolution as well as funny behavior in MyST theme, e.g. where highlighting is tied to section label. Here 6 sections are highlighted as the "current section" since they all have the same label:
When repeated labels are encountered, MyST should probably only keep the first instance.