diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-02-06 22:25:37 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-02-06 22:25:37 +0000 |
commit | c12284a87f6464cb76f414396466c8d21b762e3d (patch) | |
tree | 80acc883b0c41900eaa91e68f5d9d704cfde713c /regress/usr.bin/mandoc | |
parent | f39b167a786f1221a985d195cfe02986edb66af4 (diff) |
Some pre-handlers produce output, so reorder the code to set up
keep flags before they are called.
Without this bugfix, .Bk was ineffective in some cases.
"looks reasonable" kristaps@
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bk/break.in | 18 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bk/break.out_ascii | 9 |
2 files changed, 27 insertions, 0 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bk/break.in b/regress/usr.bin/mandoc/mdoc/Bk/break.in index de2038436a2..32d79f03b30 100644 --- a/regress/usr.bin/mandoc/mdoc/Bk/break.in +++ b/regress/usr.bin/mandoc/mdoc/Bk/break.in @@ -5,6 +5,24 @@ .Nm Bk-break .Nd handling of word keeps .Sh DESCRIPTION +Even though it is called a word keep, +.Bk -words +it will not keep words together in free-form text. +.Ek +However, even the noop macro +.Bk -words +.No is sufficient to let the keep take effect . +.Ek +Even text generated in pre-handlers must be kept together with +the text following it: +.Bk -words +.Xr one 1 No and Xr two 2 +.Ek +should be on the same line. +.Pp +Including the whole output line into the keep is not required, +including just the macros to be kept together is sufficient: +.Pp .Nm .Ar x x x x x x x x .Ar x x x x x x x x diff --git a/regress/usr.bin/mandoc/mdoc/Bk/break.out_ascii b/regress/usr.bin/mandoc/mdoc/Bk/break.out_ascii index 04bafbcccdd..623e7a9bd1a 100644 --- a/regress/usr.bin/mandoc/mdoc/Bk/break.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Bk/break.out_ascii @@ -4,6 +4,15 @@ NNAAMMEE BBkk--bbrreeaakk - handling of word keeps DDEESSCCRRIIPPTTIIOONN + Even though it is called a word keep, it will not keep words together in + free-form text. However, even the noop macro + is sufficient to let the keep take effect. Even text generated in pre- + handlers must be kept together with the text following it: + one(1) and two(2) should be on the same line. + + Including the whole output line into the keep is not required, including + just the macros to be kept together is sufficient: + BBkk--bbrreeaakk _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [o _a] |