source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: If a .Bl -tag lacks a -width, skip all non-It macros for the
@ 2010-05-24 11:59 joerg
  0 siblings, 0 replies; only message in thread
From: joerg @ 2010-05-24 11:59 UTC (permalink / raw)
  To: source

Log Message:
-----------
If a .Bl -tag lacks a -width, skip all non-It macros for the implicit
calculation. E.g. .Sm can occur as direct child of .Bl.

OK schwarze@

Modified Files:
--------------
    mdocml:
        mdoc_action.c

Revision Data
-------------
Index: mdoc_action.c
===================================================================
RCS file: /home/joerg/cvsroot/mdocml/mdoc_action.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lmdoc_action.c -Lmdoc_action.c -u -p -r1.60 -r1.61
--- mdoc_action.c
+++ mdoc_action.c
@@ -637,11 +637,14 @@ post_bl_tagwidth(POST_ARGS)
 	/* Defaults to ten ens. */
 
 	sz = 10; /* XXX: make this a macro value. */
-	nn = n->body->child;
+
+	for (nn = n->body->child; nn; nn = nn->next) {
+		if (MDOC_It == nn->tok)
+			break;
+	}
 
 	if (nn) {
 		assert(MDOC_BLOCK == nn->type);
-		assert(MDOC_It == nn->tok);
 		nn = nn->head->child;
 		if (MDOC_TEXT != nn->type) {
 			sz = mdoc_macro2len(nn->tok);
--
 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:[~2010-05-24 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-24 11:59 mdocml: If a .Bl -tag lacks a -width, skip all non-It macros for the 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).