You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, anchors in generated Markdown were not unique. There were
two problems:
1. Each parameter in a class, type, function, etc. had its own anchor,
but the `name` of the anchor was just the normalized name of the
parameter. This meant that all parameters with the same name would
have the same anchor.
2. Classes, types, etc. had their `::`s removed, whiched opened the
(rare) possibility of having non-unique anchor names for unique
type names.
This fixes those problems by:
1. Using the full name of the parameter, e.g. `$my::class::param`, to
generate an anchor name.
2. Using a better anchor normalization routine. Each invalid
character, i.e. not `[a-zA-Z0-9_-]`, is converted to `-`. This
should always result in unique anchor names for standard Puppet
identifiers, since the only invalid characters sequences are `::`
and `$` (which only appears once at the beginning of the string).
Furthermore, `-` never appears in a valid Puppet identifier, so
those two cases are the only way for it to be generated.
0 commit comments