summaryrefslogtreecommitdiffstats
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
commit7dcb39bda3829c02e25af335e95631edef2a260b (patch)
tree063e494013345024f8645fb8fe4f0c6624ae1e24
parent4e6de631247e651c0cdb6f83ef3f819d7c8fd390 (diff)
downloadmandoc-7dcb39bda3829c02e25af335e95631edef2a260b.tar.gz
Strengthened constraint for passing into `It'.
Added regression test for constrained condition.
-rw-r--r--mdoc.c3
-rw-r--r--regress/mdoc/It/freecol3.in17
2 files changed, 19 insertions, 1 deletions
diff --git a/mdoc.c b/mdoc.c
index 2d12e06d..1b7a1953 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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..58708a4c
--- /dev/null
+++ b/regress/mdoc/It/freecol3.in
@@ -0,0 +1,17 @@
+.Dd $Mdocdate$
+.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