mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Disallow repeated labels

Open fwkoch opened this issue 1 year ago • 0 comments

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:

image

When repeated labels are encountered, MyST should probably only keep the first instance.

fwkoch avatar Jun 21 '24 08:06 fwkoch