=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.265 retrieving revision 1.270 diff -u -p -r1.265 -r1.270 --- mandoc/mdoc_html.c 2017/02/05 18:15:39 1.265 +++ mandoc/mdoc_html.c 2017/02/06 03:44:58 1.270 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.265 2017/02/05 18:15:39 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.270 2017/02/06 03:44:58 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -110,6 +110,7 @@ static int mdoc_skip_pre(MDOC_ARGS); static int mdoc_sm_pre(MDOC_ARGS); static int mdoc_sp_pre(MDOC_ARGS); static int mdoc_ss_pre(MDOC_ARGS); +static int mdoc_st_pre(MDOC_ARGS); static int mdoc_sx_pre(MDOC_ARGS); static int mdoc_sy_pre(MDOC_ARGS); static int mdoc_va_pre(MDOC_ARGS); @@ -155,7 +156,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {mdoc_ft_pre, NULL}, /* Ot */ {mdoc_pa_pre, NULL}, /* Pa */ {mdoc_ex_pre, NULL}, /* Rv */ - {NULL, NULL}, /* St */ + {mdoc_st_pre, NULL}, /* St */ {mdoc_va_pre, NULL}, /* Va */ {mdoc_vt_pre, NULL}, /* Vt */ {mdoc_xr_pre, NULL}, /* Xr */ @@ -173,7 +174,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {NULL, NULL}, /* Ac */ {mdoc_quote_pre, mdoc_quote_post}, /* Ao */ {mdoc_quote_pre, mdoc_quote_post}, /* Aq */ - {NULL, NULL}, /* At */ + {mdoc_xx_pre, NULL}, /* At */ {NULL, NULL}, /* Bc */ {mdoc_bf_pre, NULL}, /* Bf */ {mdoc_quote_pre, mdoc_quote_post}, /* Bo */ @@ -581,8 +582,6 @@ mdoc_nm_pre(MDOC_ARGS) /* FALLTHROUGH */ case ROFFT_ELEM: print_otag(h, TAG_B, "c", "Nm"); - if (n->child == NULL && meta->name != NULL) - print_text(h, meta->name); return 1; case ROFFT_BODY: print_otag(h, TAG_TD, ""); @@ -649,7 +648,7 @@ mdoc_ns_pre(MDOC_ARGS) static int mdoc_ar_pre(MDOC_ARGS) { - print_otag(h, TAG_I, "c", "Ar"); + print_otag(h, TAG_VAR, "c", "Ar"); return 1; } @@ -895,6 +894,13 @@ mdoc_ex_pre(MDOC_ARGS) } static int +mdoc_st_pre(MDOC_ARGS) +{ + print_otag(h, TAG_SPAN, "c", "St"); + return 1; +} + +static int mdoc_em_pre(MDOC_ARGS) { print_otag(h, TAG_I, "c", "Em"); @@ -1088,12 +1094,12 @@ mdoc_fa_pre(MDOC_ARGS) struct tag *t; if (n->parent->tok != MDOC_Fo) { - print_otag(h, TAG_I, "c", "Fa"); + print_otag(h, TAG_VAR, "c", "Fa"); return 1; } for (nn = n->child; nn; nn = nn->next) { - t = print_otag(h, TAG_I, "c", "Fa"); + t = print_otag(h, TAG_VAR, "c", "Fa"); print_text(h, nn->string); print_tagq(h, t); if (nn->next) { @@ -1172,7 +1178,7 @@ mdoc_vt_pre(MDOC_ARGS) } else if (n->type == ROFFT_HEAD) return 0; - print_otag(h, TAG_I, "c", "Vt"); + print_otag(h, TAG_VAR, "c", "Vt"); return 1; } @@ -1180,7 +1186,7 @@ static int mdoc_ft_pre(MDOC_ARGS) { synopsis_pre(h, n); - print_otag(h, TAG_I, "c", "Ft"); + print_otag(h, TAG_VAR, "c", "Ft"); return 1; } @@ -1201,7 +1207,7 @@ mdoc_fn_pre(MDOC_ARGS) ep = strchr(sp, ' '); if (NULL != ep) { - t = print_otag(h, TAG_I, "c", "Ft"); + t = print_otag(h, TAG_VAR, "c", "Ft"); while (ep) { sz = MIN((int)(ep - sp), BUFSIZ - 1); @@ -1227,10 +1233,10 @@ mdoc_fn_pre(MDOC_ARGS) for (n = n->child->next; n; n = n->next) { if (NODE_SYNPRETTY & n->flags) - t = print_otag(h, TAG_I, "css?", "Fa", + t = print_otag(h, TAG_VAR, "css?", "Fa", "white-space", "nowrap"); else - t = print_otag(h, TAG_I, "c", "Fa"); + t = print_otag(h, TAG_VAR, "c", "Fa"); print_text(h, n->string); print_tagq(h, t); if (n->next) { @@ -1438,7 +1444,7 @@ mdoc_ic_pre(MDOC_ARGS) static int mdoc_va_pre(MDOC_ARGS) { - print_otag(h, TAG_I, "c", "Va"); + print_otag(h, TAG_VAR, "c", "Va"); return 1; } @@ -1469,7 +1475,7 @@ mdoc_bf_pre(MDOC_ARGS) else if (FONT_Li == n->norm->Bf.font) cattr = "Li"; else - cattr = "none"; + cattr = "No"; /* * We want this to be inline-formatted, but needs to be div to @@ -1512,7 +1518,7 @@ mdoc_rs_pre(MDOC_ARGS) if (n->prev && SEC_SEE_ALSO == n->sec) print_paragraph(h); - print_otag(h, TAG_SPAN, "c", "Rs"); + print_otag(h, TAG_CITE, "c", "Rs"); return 1; }