From dc48ebec7e316826f641d93e25ca90eb1929295a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 4 Oct 2018 13:23:04 +0000 Subject: When a subsection header contains no letters but only special characters, skip the TOC entry. Issue reported by kristaps@. --- mdoc_html.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mdoc_html.c b/mdoc_html.c index d9976f12..073aee35 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -541,11 +541,13 @@ mdoc_sh_pre(MDOC_ARGS) subn = subn->next) { if (subn->tok != MDOC_Ss) continue; + id = html_make_id(subn->head, 0); + if (id == NULL) + continue; if (tsub == NULL) print_otag(h, TAG_UL, "c", "Bl-compact"); tsub = print_otag(h, TAG_LI, ""); - id = html_make_id(subn->head, 0); print_otag(h, TAG_A, "hR", id); free(id); print_mdoc_nodelist(meta, -- cgit