From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (joerg@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pAGMd6Bh009264 for ; Wed, 16 Nov 2011 17:39:06 -0500 (EST) Received: (from joerg@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id pAGMd58W002354; Wed, 16 Nov 2011 17:39:05 -0500 (EST) Date: Wed, 16 Nov 2011 17:39:05 -0500 (EST) Message-Id: <201111162239.pAGMd58W002354@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: joerg@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Correctly handle constructs like .TP 8 .SH foo X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Correctly handle constructs like .TP 8 .SH foo Modified Files: -------------- mdocml: man.c Revision Data ------------- Index: man.c =================================================================== RCS file: /home/joerg/cvsroot/mdocml/man.c,v retrieving revision 1.113 retrieving revision 1.114 diff -Lman.c -Lman.c -u -p -r1.113 -r1.114 --- man.c +++ man.c @@ -556,10 +556,15 @@ man_pmacro(struct man *m, int ln, char * 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; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv