From d076a0af438bb0991cd40bccf3533ff80230a1e3 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 8 Apr 2014 07:13:02 +0000 Subject: Add a new term_flushln() flag TERMP_BRIND (if break, then indent) to control indentation of continuation lines in TERMP_NOBREAK mode. In the past, this was always on; continue using it for .Bl, .Nm, .Fn, .Fo, and .HP, but no longer for .IP and .TP. I looked at this because sthen@ reported the issue in a manual of a Perl module from ports, but it affects base, too: This patch reduces groff-mandoc differences in base by more than 15%. --- regress/usr.bin/mandoc/man/IP/Makefile | 4 ++-- regress/usr.bin/mandoc/man/IP/longhead.in | 10 ++++++++++ regress/usr.bin/mandoc/man/IP/longhead.out_ascii | 19 +++++++++++++++++++ regress/usr.bin/mandoc/man/TP/Makefile | 5 +++-- regress/usr.bin/mandoc/man/TP/longhead.in | 11 +++++++++++ regress/usr.bin/mandoc/man/TP/longhead.out_ascii | 19 +++++++++++++++++++ 6 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 regress/usr.bin/mandoc/man/IP/longhead.in create mode 100644 regress/usr.bin/mandoc/man/IP/longhead.out_ascii create mode 100644 regress/usr.bin/mandoc/man/TP/longhead.in create mode 100644 regress/usr.bin/mandoc/man/TP/longhead.out_ascii (limited to 'regress/usr.bin') diff --git a/regress/usr.bin/mandoc/man/IP/Makefile b/regress/usr.bin/mandoc/man/IP/Makefile index 13541b0eaec..a493fc0630c 100644 --- a/regress/usr.bin/mandoc/man/IP/Makefile +++ b/regress/usr.bin/mandoc/man/IP/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.6 2012/07/18 16:51:50 schwarze Exp $ +# $OpenBSD: Makefile,v 1.7 2014/04/08 07:13:01 schwarze Exp $ -REGRESS_TARGETS = literal spacing width manyargs empty +REGRESS_TARGETS = empty literal longhead manyargs spacing width .include diff --git a/regress/usr.bin/mandoc/man/IP/longhead.in b/regress/usr.bin/mandoc/man/IP/longhead.in new file mode 100644 index 00000000000..f24922c0aa1 --- /dev/null +++ b/regress/usr.bin/mandoc/man/IP/longhead.in @@ -0,0 +1,10 @@ +.TH IP-LONGHEAD 1 "April 8, 2014" OpenBSD +.SH NAME +IP-longhead \- indented paragraph with a long head +.SH DESCRIPTION +normal text +.IP "This indented paragraph has ridiculously long text \ +in its head, such that it doesn't even fit on the line" 6n +paragraph body +.PP +normal text diff --git a/regress/usr.bin/mandoc/man/IP/longhead.out_ascii b/regress/usr.bin/mandoc/man/IP/longhead.out_ascii new file mode 100644 index 00000000000..edbd820ff01 --- /dev/null +++ b/regress/usr.bin/mandoc/man/IP/longhead.out_ascii @@ -0,0 +1,19 @@ +IP-LONGHEAD(1) OpenBSD Reference Manual IP-LONGHEAD(1) + + + +NNAAMMEE + IP-longhead - indented paragraph with a long head + +DDEESSCCRRIIPPTTIIOONN + normal text + + This indented paragraph has ridiculously long text in its head, such + that it doesn't even fit on the line + paragraph body + + normal text + + + +OpenBSD April 8, 2014 IP-LONGHEAD(1) diff --git a/regress/usr.bin/mandoc/man/TP/Makefile b/regress/usr.bin/mandoc/man/TP/Makefile index fd42111dbf7..d5b74f160d1 100644 --- a/regress/usr.bin/mandoc/man/TP/Makefile +++ b/regress/usr.bin/mandoc/man/TP/Makefile @@ -1,5 +1,6 @@ -# $OpenBSD: Makefile,v 1.6 2014/03/08 15:50:21 schwarze Exp $ +# $OpenBSD: Makefile,v 1.7 2014/04/08 07:13:01 schwarze Exp $ -REGRESS_TARGETS = literal width manyargs badarg macrotag double sameline +REGRESS_TARGETS = badarg double literal longhead macrotag manyargs +REGRESS_TARGETS += sameline width .include diff --git a/regress/usr.bin/mandoc/man/TP/longhead.in b/regress/usr.bin/mandoc/man/TP/longhead.in new file mode 100644 index 00000000000..2fab0df4933 --- /dev/null +++ b/regress/usr.bin/mandoc/man/TP/longhead.in @@ -0,0 +1,11 @@ +.TH TP-LONGHEAD 1 "April 8, 2014" OpenBSD +.SH NAME +TP-longhead \- tagged paragraph with a long head +.SH DESCRIPTION +normal text +.TP 6n +.B "This tagged paragraph has ridiculously long text \ +in its head, such that it doesn't even fit on the line" +paragraph body +.PP +normal text diff --git a/regress/usr.bin/mandoc/man/TP/longhead.out_ascii b/regress/usr.bin/mandoc/man/TP/longhead.out_ascii new file mode 100644 index 00000000000..5a519103125 --- /dev/null +++ b/regress/usr.bin/mandoc/man/TP/longhead.out_ascii @@ -0,0 +1,19 @@ +TP-LONGHEAD(1) OpenBSD Reference Manual TP-LONGHEAD(1) + + + +NNAAMMEE + TP-longhead - tagged paragraph with a long head + +DDEESSCCRRIIPPTTIIOONN + normal text + + TThhiiss ttaaggggeedd ppaarraaggrraapphh hhaass rriiddiiccuulloouussllyy lloonngg tteexxtt iinn iittss hheeaadd,, ssuucchh tthhaatt + iitt ddooeessnn''tt eevveenn ffiitt oonn tthhee lliinnee + paragraph body + + normal text + + + +OpenBSD April 8, 2014 TP-LONGHEAD(1) -- cgit v1.2.3