]> git.cameronkatri.com Git - mandoc.git/commitdiff
Strengthened constraint for passing into `It'.
authorKristaps Dzonsons <kristaps@bsd.lv>
Mon, 31 May 2010 15:50:48 +0000 (15:50 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Mon, 31 May 2010 15:50:48 +0000 (15:50 +0000)
Added regression test for constrained condition.

mdoc.c
regress/mdoc/It/freecol3.in [new file with mode: 0644]

diff --git a/mdoc.c b/mdoc.c
index 2f0cc8b8338f766b05ba021a04c9667cc9a27b10..53f85216042a1631f81a33cbe51f2ece1108428f 100644 (file)
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/*     $Id: mdoc.c,v 1.142 2010/05/31 15:42:09 kristaps Exp $ */
+/*     $Id: mdoc.c,v 1.143 2010/05/31 15:50:48 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -567,7 +567,8 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int offs)
         * should process within its context).
         */
 
-       if (MDOC_Bl == n->tok && LIST_column == n->data.list) {
+       if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
+                       LIST_column == n->data.list) {
                m->flags |= MDOC_FREECOL;
                return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));
        }
diff --git a/regress/mdoc/It/freecol3.in b/regress/mdoc/It/freecol3.in
new file mode 100644 (file)
index 0000000..3e6e254
--- /dev/null
@@ -0,0 +1,17 @@
+.Dd $Mdocdate: May 31 2010 $
+.Dt FOO
+.Os
+.Sh NAME
+.Nm foo
+.Nd bar
+.Sh DESCRIPTION
+hello
+.Bl -column asdfasdf asdfasdf
+hello  there
+hello  there
+.It hello      there
+.It hello Ta there
+.It hello Ta
+there
+.El
+bubu