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
{{ message }}
Repository navigation
anchors_plugin: a heading with no slug-able characters gets an empty id="" attribute #175
The plugin already documents the right doctrine for the explicit-ID path — "an empty explicit ID counts as no ID" (test_explicit_heading_id_edge_cases even asserts 'id=""' not in rendered and 'href="#"' not in rendered) — but the generated-slug path never checks for an empty result, so the same invalid HTML slips in from slugify() (a title of only non-word characters like ???, ***, or $$$ slugifies to "").
Expected
A heading whose generated slug is empty should be treated the same way as an empty explicit ID: no id attribute at all, and no permalink for it (href="#" would point at the top of the page).
Activity