chore(docs): add directive to pad heading anchors

Closes #2070
Closes #9360
The regex is wrong. It will match anything either starting with `h\d+` or ending with `a` (e.g. `<h1custom-element>` or `<textarea>`).
It should be: `/^(h\d+|a)$/i`