Hi Raphael, Raphael Graf wrote on Sat, Dec 22, 2018 at 03:32:45PM +0100:
> The html output contains nested anchor tags if the TABLE OF CONTENTS > has a second level. > For example, see http://man.openbsd.org/mdoc > > The diff closes the anchor tag before printing the 'ul' of the second level. I think your patch is completely correct. I committed and installed the simplified version appended below. Thanks for your report, Ingo Log Message: ----------- In the TOC, close <a> before opening <ul>. Simplified version of a bugfix patch from rapha@. Modified Files: -------------- mandoc: mdoc_html.c Revision Data ------------- Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v retrieving revision 1.318 retrieving revision 1.319 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.318 -r1.319 --- mdoc_html.c +++ mdoc_html.c @@ -534,9 +534,10 @@ mdoc_sh_pre(MDOC_ARGS) for (sn = n; sn != NULL; sn = sn->next) { tsec = print_otag(h, TAG_LI, ""); id = html_make_id(sn->head, 0); - print_otag(h, TAG_A, "hR", id); + tsub = print_otag(h, TAG_A, "hR", id); free(id); print_mdoc_nodelist(meta, sn->head->child, h); + print_tagq(h, tsub); tsub = NULL; for (subn = sn->body->child; subn != NULL; subn = subn->next) {
