=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.143 retrieving revision 1.146 diff -u -p -r1.143 -r1.146 --- mandoc/man_html.c 2017/06/08 12:54:58 1.143 +++ mandoc/man_html.c 2018/04/11 17:11:13 1.146 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.143 2017/06/08 12:54:58 schwarze Exp $ */ +/* $Id: man_html.c,v 1.146 2018/04/11 17:11:13 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -26,6 +26,7 @@ #include #include "mandoc_aux.h" +#include "mandoc.h" #include "roff.h" #include "man.h" #include "out.h" @@ -105,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; @@ -229,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: @@ -258,6 +262,8 @@ print_man_node(MAN_ARGS) break; print_paragraph(h); return; + case ROFFT_COMMENT: + return; default: break; } @@ -643,11 +649,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);