* mdocml: Correctly handle constructs like .TP 8 .SH foo
@ 2011-11-16 22:39 joerg
0 siblings, 0 replies; only message in thread
From: joerg @ 2011-11-16 22:39 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-16 22:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 22:39 mdocml: Correctly handle constructs like .TP 8 .SH foo joerg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).