alphagov / tech-docs-gem

Gem to distribute the tech docs project
https://tdt-documentation.london.cloudapps.digital/
MIT License
15 stars 38 forks source link

Bug: Anchor link URL can be `#undefined` #309

Open lfdebrux opened 2 years ago

lfdebrux commented 2 years ago

Originally reported in #305.

a link was being injected with the href of #undefined due to a missing id attribute on the <h2> element

What should change

This should be fixed at build time. Either we should autogenerates a sensible default, or failing that, report missing ids.

User need

End users need to have working anchor links for all headings. Authors need to know if a heading is missing a working anchor link.