=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_html.c,v retrieving revision 1.122 retrieving revision 1.123 diff -c -r1.122 -r1.123 *** src/usr.bin/mandoc/man_html.c 2019/01/11 16:35:39 1.122 --- src/usr.bin/mandoc/man_html.c 2019/01/18 14:36:16 1.123 *************** *** 1,4 **** ! /* $OpenBSD: man_html.c,v 1.122 2019/01/11 16:35:39 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013-2015, 2017-2019 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: man_html.c,v 1.123 2019/01/18 14:36:16 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013-2015, 2017-2019 Ingo Schwarze *************** *** 166,175 **** html_fillmode(h, n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi); child = 1; - t = h->tag; - if (t->tag == TAG_P || t->tag == TAG_PRE) - t = t->next; - switch (n->type) { case ROFFT_TEXT: if (*n->string == '\0') { --- 166,171 ---- *************** *** 181,189 **** --- 177,189 ---- print_endline(h); else if (n->flags & NODE_DELIMC) h->flags |= HTML_NOSPACE; + t = h->tag; + t->refcnt++; print_text(h, n->string); break; case ROFFT_EQN: + t = h->tag; + t->refcnt++; print_eqn(h, n->eqn); break; case ROFFT_TBL: *************** *** 209,220 **** * the "meta" table state. This will be reopened on the * next table element. */ ! if (h->tblt != NULL) { print_tblclose(h); ! t = h->tag; ! } if (n->tok < ROFF_MAX) { roff_html_pre(h, n); print_stagq(h, t); return; } --- 209,221 ---- * the "meta" table state. This will be reopened on the * next table element. */ ! if (h->tblt != NULL) print_tblclose(h); ! t = h->tag; ! t->refcnt++; if (n->tok < ROFF_MAX) { roff_html_pre(h, n); + t->refcnt--; print_stagq(h, t); return; } *************** *** 229,234 **** --- 230,236 ---- print_man_nodelist(man, n->child, h); /* This will automatically close out any font scope. */ + t->refcnt--; print_stagq(h, t); if (n->flags & NODE_NOFILL && n->tok != MAN_YS &&