summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2012-07-18 11:09:31 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2012-07-18 11:09:31 +0000
commitf0649356f08ec54bfa01c6ab733db8d7e0d04e42 (patch)
tree4a292fcca0b81b1732f41387e6413b7550b55338 /regress/usr.bin/mandoc
parent60dd10dead840994ee21087a8fcdcf92aa139c64 (diff)
Fix handling of paragraph macros inside lists:
* When they are trailing the last item, move them outside the list. * When they are trailing any other none-compact item, drop them. Improves formatting of 40 pages, e.g. grep(1), ksh(1), netstat(1), ath(4), bsd.port.mk(5), pf.conf(5), mount(8), crypto(9).
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r--regress/usr.bin/mandoc/mdoc/blank/Makefile6
-rw-r--r--regress/usr.bin/mandoc/mdoc/blank/list.in66
-rw-r--r--regress/usr.bin/mandoc/mdoc/blank/list.out_ascii42
3 files changed, 112 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/blank/Makefile b/regress/usr.bin/mandoc/mdoc/blank/Makefile
index 3de9b48f2a7..d1a10ae120e 100644
--- a/regress/usr.bin/mandoc/mdoc/blank/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/blank/Makefile
@@ -1,5 +1,7 @@
-# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2012/07/18 11:09:30 schwarze Exp $
-REGRESS_TARGETS=line comment
+REGRESS_TARGETS = line comment list
+
+SKIP_TMAN = list
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/blank/list.in b/regress/usr.bin/mandoc/mdoc/blank/list.in
new file mode 100644
index 00000000000..067e3dcfcc6
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/blank/list.in
@@ -0,0 +1,66 @@
+.Dd July 17, 2012
+.Dt BLANK-LIST 1
+.Os OpenBSD
+.Sh NAME
+.Nm blank-list
+.Nd handling of blank lines in lists
+.Sh DESCRIPTION
+normal list:
+.Bl -item -offset indent
+.It
+first item
+.It
+second item
+.El
+list with paragraphs:
+.Bl -item -offset indent
+.It
+first item
+.Pp
+.It
+second item
+.Pp
+.El
+list with final paragraph:
+.Bl -item -offset indent
+.It
+item
+.El
+.Pp
+list with double paragraph:
+.Bl -item -offset indent
+.It
+item
+.Pp
+.El
+.Pp
+normal compact list:
+.Bl -item -compact -offset indent
+.It
+first item
+.It
+second item
+.El
+compact list with paragraphs:
+.Bl -item -compact -offset indent
+.It
+first item
+.Pp
+.It
+second item
+.Pp
+.El
+compact list with final paragraph:
+.Bl -item -compact -offset indent
+.It
+item
+.El
+.Pp
+compact list with double paragraph:
+.Bl -item -compact -offset indent
+.It
+item
+.Pp
+.El
+.Pp
+End.
diff --git a/regress/usr.bin/mandoc/mdoc/blank/list.out_ascii b/regress/usr.bin/mandoc/mdoc/blank/list.out_ascii
new file mode 100644
index 00000000000..5dce1cb2c76
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/blank/list.out_ascii
@@ -0,0 +1,42 @@
+BLANK-LIST(1) OpenBSD Reference Manual BLANK-LIST(1)
+
+NNAAMMEE
+ bbllaannkk--lliisstt - handling of blank lines in lists
+
+DDEESSCCRRIIPPTTIIOONN
+ normal list:
+
+ first item
+
+ second item
+ list with paragraphs:
+
+ first item
+
+ second item
+
+ list with final paragraph:
+
+ item
+
+ list with double paragraph:
+
+ item
+
+ normal compact list:
+ first item
+ second item
+ compact list with paragraphs:
+ first item
+
+ second item
+
+ compact list with final paragraph:
+ item
+
+ compact list with double paragraph:
+ item
+
+ End.
+
+OpenBSD July 17, 2012 OpenBSD