Make definition anchors more unique (#1339)

Stick a `definition-` on the front of the autogenerated anchors for definition
blocks.

This solves a problem where, for example,
https://spec.matrix.org/unstable/application-service-api/#registration could
refer to either the "Registration" section or the `Registration` definition
therein.

(These anchors are relatively recent: they were added in #1191.
pull/1346/head
Richard van der Hoff 2 years ago committed by GitHub
parent ac1c5ad2bb
commit bc15d4f9bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Make definition anchors more unique.

@ -30,7 +30,7 @@
{{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }}
{{ $definition = partial "json-schema/resolve-allof" $definition }}
<section class="rendered-data definition" id="{{ anchorize $definition.title }}">
<section class="rendered-data definition" id="definition-{{ anchorize $definition.title }}">
<details {{ if not $compact }}open{{ end }}>
<summary>

Loading…
Cancel
Save