=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_html.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- src/usr.bin/mandoc/man_html.c 2017/02/05 18:13:28 1.86 +++ src/usr.bin/mandoc/man_html.c 2017/03/15 11:29:50 1.87 @@ -1,4 +1,4 @@ -/* $OpenBSD: man_html.c,v 1.86 2017/02/05 18:13:28 schwarze Exp $ */ +/* $OpenBSD: man_html.c,v 1.87 2017/03/15 11:29:50 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -433,8 +433,14 @@ 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); + print_otag(h, TAG_A, "chR", "selflink", id); + free(id); + } return 1; } @@ -496,8 +502,14 @@ 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); + print_otag(h, TAG_A, "chR", "selflink", id); + free(id); + } return 1; } @@ -654,7 +666,7 @@ 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);