X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/37dca223f8adbfb62ab71687a8b3f306804295c8..8de4ded6987a3b6b7319c84e37ec2740d8b3f0aa:/man.c diff --git a/man.c b/man.c index a901c82c..ece4868f 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.113 2011/11/07 01:24:40 schwarze Exp $ */ +/* $Id: man.c,v 1.116 2012/06/02 20:16:23 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * @@ -40,7 +40,7 @@ const char *const __man_macronames[MAN_MAX] = { "RI", "na", "sp", "nf", "fi", "RE", "RS", "DT", "UC", "PD", "AT", "in", - "ft" + "ft", "OP", "EX", "EE" }; const char * const *man_macronames = __man_macronames; @@ -556,10 +556,15 @@ man_pmacro(struct man *m, int ln, char *buf, int offs) if ((m->flags & MAN_BLINE) && (MAN_BSCOPE & man_macros[tok].flags)) { n = m->last; - assert(MAN_TEXT != n->type); - /* Remove element that didn't end BLINE, if any. */ + /* Might be a text node like 8 in + * .TP 8 + * .SH foo + */ + if (MAN_TEXT == n->type) + n = n->parent; + /* Remove element that didn't end BLINE, if any. */ if ( ! (MAN_BSCOPE & man_macros[n->tok].flags)) n = n->parent;