diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-10-04 13:23:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-10-04 13:23:04 +0000 |
commit | dc48ebec7e316826f641d93e25ca90eb1929295a (patch) | |
tree | cee70019b30e9bcc95fc3999902dc050a61d797e /mdoc_html.c | |
parent | ac3e64d4a46ee1fee8c38f160260efffe5a64a3e (diff) | |
download | mandoc-dc48ebec7e316826f641d93e25ca90eb1929295a.tar.gz |
When a subsection header contains no letters but only special
characters, skip the TOC entry. Issue reported by kristaps@.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, |