=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.240 retrieving revision 1.243 diff -u -p -r1.240 -r1.243 --- mandoc/html.c 2018/10/02 12:33:37 1.240 +++ mandoc/html.c 2018/11/23 19:17:05 1.243 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.240 2018/10/02 12:33:37 schwarze Exp $ */ +/* $Id: html.c,v 1.243 2018/11/23 19:17:05 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze @@ -136,6 +136,8 @@ html_alloc(const struct manoutput *outopts) h->base_includes = outopts->includes; if (outopts->fragment) h->oflags |= HTML_FRAGMENT; + if (outopts->toc) + h->oflags |= HTML_TOC; mandoc_ohash_init(&id_unique, 4, 0); @@ -226,6 +228,9 @@ print_metaf(struct html *h, enum mandoc_esc deco) case ESCAPE_FONTBI: font = HTMLFONT_BI; break; + case ESCAPE_FONTCW: + font = HTMLFONT_CW; + break; case ESCAPE_FONT: case ESCAPE_FONTROMAN: font = HTMLFONT_NONE; @@ -253,6 +258,9 @@ print_metaf(struct html *h, enum mandoc_esc deco) h->metaf = print_otag(h, TAG_B, ""); print_otag(h, TAG_I, ""); break; + case HTMLFONT_CW: + h->metaf = print_otag(h, TAG_SPAN, "c", "Li"); + break; default: break; } @@ -406,9 +414,13 @@ print_encode(struct html *h, const char *p, const char case ESCAPE_FONTBOLD: case ESCAPE_FONTITALIC: case ESCAPE_FONTBI: + case ESCAPE_FONTCW: case ESCAPE_FONTROMAN: - if (0 == norecurse) + if (0 == norecurse) { + h->flags |= HTML_NOSPACE; print_metaf(h, esc); + h->flags &= ~HTML_NOSPACE; + } continue; case ESCAPE_SKIPCHAR: h->flags |= HTML_SKIPCHAR; @@ -735,6 +747,9 @@ print_text(struct html *h, const char *word) case HTMLFONT_BI: h->metaf = print_otag(h, TAG_B, ""); print_otag(h, TAG_I, ""); + break; + case HTMLFONT_CW: + h->metaf = print_otag(h, TAG_SPAN, "c", "Li"); break; default: print_indent(h);