=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.132 retrieving revision 1.135 diff -u -p -r1.132 -r1.135 --- mandoc/man_html.c 2017/01/30 20:24:02 1.132 +++ mandoc/man_html.c 2017/03/17 12:10:16 1.135 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.132 2017/01/30 20:24:02 schwarze Exp $ */ +/* $Id: man_html.c,v 1.135 2017/03/17 12:10:16 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -374,7 +374,6 @@ man_root_pre(MAN_ARGS) mandoc_asprintf(&title, "%s(%s)", man->title, man->msec); t = print_otag(h, TAG_TABLE, "c", "head"); - print_otag(h, TAG_TBODY, ""); tt = print_otag(h, TAG_TR, ""); print_otag(h, TAG_TD, "c", "head-ltitle"); @@ -436,8 +435,15 @@ man_br_pre(MAN_ARGS) static int man_SH_pre(MAN_ARGS) { - if (n->type == ROFFT_HEAD) - print_otag(h, TAG_H1, "c", "Sh"); + char *id; + + if (n->type == ROFFT_HEAD) { + id = html_make_id(n); + print_otag(h, TAG_H1, "cTi", "Sh", id); + if (id != NULL) + print_otag(h, TAG_A, "chR", "selflink", id); + free(id); + } return 1; } @@ -499,8 +505,15 @@ man_SM_pre(MAN_ARGS) static int man_SS_pre(MAN_ARGS) { - if (n->type == ROFFT_HEAD) - print_otag(h, TAG_H2, "c", "Ss"); + char *id; + + if (n->type == ROFFT_HEAD) { + id = html_make_id(n); + print_otag(h, TAG_H2, "cTi", "Ss", id); + if (id != NULL) + print_otag(h, TAG_A, "chR", "selflink", id); + free(id); + } return 1; } @@ -657,7 +670,7 @@ man_UR_pre(MAN_ARGS) assert(n->type == ROFFT_HEAD); if (n->child != NULL) { assert(n->child->type == ROFFT_TEXT); - print_otag(h, TAG_A, "ch", "Lk", n->child->string); + print_otag(h, TAG_A, "cTh", "Lk", n->child->string); } assert(n->next->type == ROFFT_BODY);