tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: "tech@mdocml.bsd.lv" <tech@mdocml.bsd.lv>
Subject: Re: .Bl and .Pp
Date: Sun, 23 May 2010 02:14:14 +0200	[thread overview]
Message-ID: <20100523001413.GA1698@britannica.bec.de> (raw)
In-Reply-To: <4BF2442F.5020704@bsd.lv>

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

On Tue, May 18, 2010 at 09:39:27AM +0200, Kristaps Dzonsons wrote:
> >The file also shows another issue.
> >
> >.Bl -tag -compact
> >.Sm off
> >.It ...
> >.Sm on
> >.El
> >
> >triggers the assertion in mdoc_action.c:618 (post_bl_tagwidth).
> >
> >I think we have to explicitly scan forward until we find an .It child,
> >but what do you think?
> 
> Will look into it...

Patch attached. Skip over non-It macros for this purpose.

Joerg

[-- Attachment #2: mdoc_action.c.diff --]
[-- Type: text/plain, Size: 709 bytes --]

Index: mdoc_action.c
===================================================================
RCS file: /home/joerg/cvsroot/mdocml/mdoc_action.c,v
retrieving revision 1.60
diff -u -p -r1.60 mdoc_action.c
--- mdoc_action.c	17 May 2010 23:57:06 -0000	1.60
+++ mdoc_action.c	23 May 2010 00:07:11 -0000
@@ -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);

  parent reply	other threads:[~2010-05-23  0:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100517220042.GA21819@britannica.bec.de>
2010-05-18  7:39 ` Kristaps Dzonsons
2010-05-18 16:28   ` Joerg Sonnenberger
2010-05-18 20:07   ` Ingo Schwarze
2010-05-23  0:14   ` Joerg Sonnenberger [this message]
2010-05-24  2:24     ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100523001413.GA1698@britannica.bec.de \
    --to=joerg@britannica.bec.de \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).