summaryrefslogtreecommitdiffstats
path: root/mdoc_action.c
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@netbsd.org>2010-05-24 11:59:37 +0000
committerJoerg Sonnenberger <joerg@netbsd.org>2010-05-24 11:59:37 +0000
commite6a9f5cacd5f86b81f57036ddda9f64e2fd5116b (patch)
tree5488a0bd508d3f0d72bb456cccbd0ec0135d4f26 /mdoc_action.c
parent3525f467452a38709580a683beac14972d3e25e8 (diff)
downloadmandoc-e6a9f5cacd5f86b81f57036ddda9f64e2fd5116b.tar.gz
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@
Diffstat (limited to 'mdoc_action.c')
-rw-r--r--mdoc_action.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index e886a3d0..00e5b8cc 100644
--- a/mdoc_action.c
+++ b/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);