aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-31 15:50:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-31 15:50:48 +0000
commitb6aa2f00fb00f63dc5e8e9e66c27887dfb7cb608 (patch)
treebf5d6d9b429e75aa72f953ccb993dd3606ed1b02
parent21bb451eea95935f615ded5d57dc8c6c9d2224f8 (diff)
downloadmandoc-b6aa2f00fb00f63dc5e8e9e66c27887dfb7cb608.tar.gz
mandoc-b6aa2f00fb00f63dc5e8e9e66c27887dfb7cb608.tar.zst
mandoc-b6aa2f00fb00f63dc5e8e9e66c27887dfb7cb608.zip
Strengthened constraint for passing into `It'.
Added regression test for constrained condition.
-rw-r--r--mdoc.c5
-rw-r--r--regress/mdoc/It/freecol3.in17
2 files changed, 20 insertions, 2 deletions
diff --git a/mdoc.c b/mdoc.c
index 2f0cc8b8..53f85216 100644
--- 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
index 00000000..3e6e254e
--- /dev/null
+++ b/regress/mdoc/It/freecol3.in
@@ -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