=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.240 retrieving revision 1.243 diff -u -p -r1.240 -r1.243 --- mandoc/mdoc_html.c 2016/01/08 17:48:09 1.240 +++ mandoc/mdoc_html.c 2017/01/10 12:53:07 1.243 @@ -1,7 +1,7 @@ -/* $Id: mdoc_html.c,v 1.240 2016/01/08 17:48:09 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.243 2017/01/10 12:53:07 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons - * Copyright (c) 2014, 2015, 2016 Ingo Schwarze + * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -377,6 +377,9 @@ print_mdoc_node(MDOC_ARGS) int child; struct tag *t; + if (n->flags & NODE_NOPRT) + return; + child = 1; t = h->tags.head; n->flags &= ~MDOC_ENDED; @@ -1121,15 +1124,15 @@ mdoc_bd_pre(MDOC_ARGS) bufcat_su(h, "margin-left", &su); PAIR_STYLE_INIT(&tag[0], h); - if (DISP_unfilled != n->norm->Bd.type && - DISP_literal != n->norm->Bd.type) { - PAIR_CLASS_INIT(&tag[1], "display"); - print_otag(h, TAG_DIV, 2, tag); + PAIR_CLASS_INIT(&tag[1], "display"); + print_otag(h, TAG_DIV, 2, tag); + + if (n->norm->Bd.type != DISP_unfilled && + n->norm->Bd.type != DISP_literal) return 1; - } - PAIR_CLASS_INIT(&tag[1], "lit display"); - print_otag(h, TAG_PRE, 2, tag); + PAIR_CLASS_INIT(&tag[0], "lit"); + print_otag(h, TAG_PRE, 1, tag); /* This can be recursive: save & set our literal state. */ @@ -1849,7 +1852,7 @@ mdoc_no_pre(MDOC_ARGS) struct htmlpair tag; PAIR_CLASS_INIT(&tag, "none"); - print_otag(h, TAG_CODE, 1, &tag); + print_otag(h, TAG_SPAN, 1, &tag); return 1; }