[webauthn] Pull Request: Use consistent section id prefixes

emlun has just submitted a new pull request for https://github.com/w3c/webauthn:

== Use consistent section id prefixes ==
Fixes #704.

Exceptions:

- Section/anchor IDs already beginning with any of these prefixes remain unchanged:
  - `iface-`
  - `dictionary-`
  - `fig-`
  - `table-`
- Anchors within text remain unchanged
- Section IDs for sections containing a `<dfn dictionary>` are changed to use the prefix `dictionary-`
- Section IDs for sections containing a `<dfn enum>` are changed to use the prefix `enum-`

```
sed -i 's/{#/{#sctn-/g' index.bs
sed -i 's/\[\[#/[[#sctn-/g' index.bs
sed -i 's/(#/(#sctn-/g' index.bs

# Fix false positives
sed -i 's/#sctn-dictionary-/#dictionary-/g' index.bs
sed -i 's/{#sctn-iface-/{#iface-/g' index.bs
sed -i 's/(#sctn-fig-/(#fig-/g' index.bs
sed -i 's/(#sctn-table-/(#table-/g' index.bs
sed -i 's/(#sctn-authenticatorGetAssertion-return-values/(#authenticatorGetAssertion-return-values/g' index.bs
sed -i 's/(#sctn-allowCredentialDescriptorListCreation/(#allowCredentialDescriptorListCreation/g' index.bs
sed -i 's/(#sctn-assertionCreationDataCreation/(#assertionCreationDataCreation/g' index.bs
sed -i 's/\[\[#sctn-index-defined-elsewhere/[[#index-defined-elsewhere/g' index.bs
sed -i 's/\[\[#sctn-idl-index/[[#idl-index/g' index.bs

# Fix sections already prefixed with sctn-
sed -i 's/{#sctn-sctn-/{#sctn-/g' index.bs
sed -i 's/\[\[#sctn-sctn-/[[#sctn-/g' index.bs
sed -i 's/(#sctn-sctn-/(#sctn-/g' index.bs

# Fix sections already prefixed with sec-
sed -i 's/{#sctn-sec-/{#sctn-/g' index.bs
sed -i 's/\[\[#sctn-sec-/[[#sctn-/g' index.bs
sed -i 's/(#sctn-sec-/(#sctn-/g' index.bs

# Replace sctn- prefix with dictionary- for dictionary <dfn> sections
sed -i 's/#sctn-credential-params/#dictionary-credential-params/g' index.bs
sed -i 's/#sctn-rp-credential-params/#dictionary-rp-credential-params/g' index.bs
sed -i 's/#sctn-user-credential-params/#dictionary-user-credential-params/g' index.bs
sed -i 's/#sctn-authenticatorSelection/#dictionary-authenticatorSelection/g' index.bs
sed -i 's/#sctn-assertion-options/#dictionary-assertion-options/g' index.bs
sed -i 's/#sctn-client-data/#dictionary-client-data/g' index.bs
sed -i 's/#sctn-credential-dictionary/#dictionary-credential-descriptor/g' index.bs

# Replace sctn- prefix with enum- for enum <dfn> sections
sed -i 's/#sctn-attachment/#enum-attachment/g' index.bs
sed -i 's/#sctn-residentKeyRequirement/#enum-residentKeyRequirement/g' index.bs
sed -i 's/#sctn-attestation-convey/#enum-attestation-convey/g' index.bs
sed -i 's/#sctn-credentialType/#enum-credentialType/g' index.bs
sed -i 's/#sctn-transport/#enum-transport/g' index.bs
sed -i 's/#sctn-userVerificationRequirement/#enum-userVerificationRequirement/g' index.bs
```

See https://github.com/w3c/webauthn/pull/1212

Received on Thursday, 9 May 2019 10:33:07 UTC