=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_html.c,v retrieving revision 1.97 retrieving revision 1.98 diff -c -r1.97 -r1.98 *** src/usr.bin/mandoc/man_html.c 2017/06/24 14:38:27 1.97 --- src/usr.bin/mandoc/man_html.c 2017/06/25 07:23:53 1.98 *************** *** 1,4 **** ! /* $OpenBSD: man_html.c,v 1.97 2017/06/24 14:38:27 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: man_html.c,v 1.98 2017/06/25 07:23:53 bentley Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze *************** *** 104,109 **** --- 104,111 ---- { NULL, NULL }, /* EE */ { man_UR_pre, NULL }, /* UR */ { NULL, NULL }, /* UE */ + { man_UR_pre, NULL }, /* MT */ + { NULL, NULL }, /* ME */ }; static const struct htmlman *const mans = __mans - MAN_TH; *************** *** 228,233 **** --- 230,236 ---- case MAN_P: /* reopen .nf in the body. */ case MAN_RS: case MAN_UR: + case MAN_MT: fillmode(h, MAN_fi); break; default: *************** *** 642,652 **** static int man_UR_pre(MAN_ARGS) { n = n->child; assert(n->type == ROFFT_HEAD); if (n->child != NULL) { assert(n->child->type == ROFFT_TEXT); ! print_otag(h, TAG_A, "cTh", "Lk", n->child->string); } assert(n->next->type == ROFFT_BODY); --- 645,661 ---- static int man_UR_pre(MAN_ARGS) { + char *cp; n = n->child; assert(n->type == ROFFT_HEAD); if (n->child != NULL) { assert(n->child->type == ROFFT_TEXT); ! if (n->tok == MAN_MT) { ! mandoc_asprintf(&cp, "mailto:%s", n->child->string); ! print_otag(h, TAG_A, "cTh", "Mt", cp); ! free(cp); ! } else ! print_otag(h, TAG_A, "cTh", "Lk", n->child->string); } assert(n->next->type == ROFFT_BODY);