=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.144 retrieving revision 1.145 diff -u -p -r1.144 -r1.145 --- mandoc/man_html.c 2017/06/24 14:38:32 1.144 +++ mandoc/man_html.c 2017/06/25 11:42:02 1.145 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.144 2017/06/24 14:38:32 schwarze Exp $ */ +/* $Id: man_html.c,v 1.145 2017/06/25 11:42:02 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -106,6 +106,8 @@ static const struct htmlman __mans[MAN_MAX - MAN_TH] = { 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; @@ -230,6 +232,7 @@ print_man_node(MAN_ARGS) case MAN_P: /* reopen .nf in the body. */ case MAN_RS: case MAN_UR: + case MAN_MT: fillmode(h, MAN_fi); break; default: @@ -644,11 +647,17 @@ man_RS_pre(MAN_ARGS) 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); - print_otag(h, TAG_A, "cTh", "Lk", n->child->string); + 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);