diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-11-16 17:16:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-11-16 17:16:30 +0000 |
commit | 06de48388a133b00eb9122b0fa77d1ee45f80c83 (patch) | |
tree | 66c3c632a4249b4158581770ef8f5f0473f3910a /regress | |
parent | c267ec5f9cd76a1825c19cb92ba242a1806f6cc3 (diff) |
Improve formatting of badly nested font blocks.
The basic idea is to already pop the font at the end marker
instead of allowing it to linger until the final end of the block.
This requires a few preliminaries:
* For each block, save a pointer to the previous font
to be used in case the block breaks another and gets extended.
* That requires making node information writable during rendering.
* Now fonts may get popped in the wrong order; hence, after the stack
has already been rewound further by some block that began earlier,
ignore popping a font that was put on the stack later.
* To be able to exploit all this for font blocks, tie processing
to their body, not their block, which is more logical anyway.
Triggered by florian@ reporting vaguely similar issues with list blocks.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bf/Makefile | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bf/break.in | 16 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bf/break.out_ascii | 9 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bf/broken.in | 15 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Bf/broken.out_ascii | 9 |
5 files changed, 59 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bf/Makefile b/regress/usr.bin/mandoc/mdoc/Bf/Makefile index bf943fcd0e3..ed22f8ea87c 100644 --- a/regress/usr.bin/mandoc/mdoc/Bf/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Bf/Makefile @@ -1,5 +1,13 @@ -# $OpenBSD: Makefile,v 1.1 2012/07/09 18:55:40 schwarze Exp $ +# $OpenBSD: Makefile,v 1.2 2012/11/16 17:16:29 schwarze Exp $ -REGRESS_TARGETS = nest +REGRESS_TARGETS = nest break broken + +# groff-1.20.1 defect: +# - If a font block breaks another block, +# fonts get mixed up when the other block finally ends. + +SKIP_GROFF = break + +SKIP_TMAN = break broken .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Bf/break.in b/regress/usr.bin/mandoc/mdoc/Bf/break.in new file mode 100644 index 00000000000..5a905655ec4 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Bf/break.in @@ -0,0 +1,16 @@ +.Dd November 10, 2012 +.Dt BF-BREAK 1 +.Os OpenBSD +.Sh NAME +.Nm Bf-break +.Nd font block breaking another block +.Sh DESCRIPTION +before both +.Bf Em +before bracket +.Bo +inside both +.Ef +after font block +.Bc +after both diff --git a/regress/usr.bin/mandoc/mdoc/Bf/break.out_ascii b/regress/usr.bin/mandoc/mdoc/Bf/break.out_ascii new file mode 100644 index 00000000000..ab8270d49d5 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Bf/break.out_ascii @@ -0,0 +1,9 @@ +BF-BREAK(1) OpenBSD Reference Manual BF-BREAK(1) + +NNAAMMEE + BBff--bbrreeaakk - font block breaking another block + +DDEESSCCRRIIPPTTIIOONN + before both _b_e_f_o_r_e _b_r_a_c_k_e_t _[_i_n_s_i_d_e _b_o_t_h after font block] after both + +OpenBSD November 10, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Bf/broken.in b/regress/usr.bin/mandoc/mdoc/Bf/broken.in new file mode 100644 index 00000000000..228e4c5f1d5 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Bf/broken.in @@ -0,0 +1,15 @@ +.Dd November 10, 2012 +.Dt BF-BROKEN 1 +.Os OpenBSD +.Sh NAME +.Nm Bf-broken +.Nd font block broken by another block +.Sh DESCRIPTION +before both +.Bo before font block +.Bf Em +inside both +.Bc +after bracket +.Ef +after both diff --git a/regress/usr.bin/mandoc/mdoc/Bf/broken.out_ascii b/regress/usr.bin/mandoc/mdoc/Bf/broken.out_ascii new file mode 100644 index 00000000000..b626dbb0d70 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Bf/broken.out_ascii @@ -0,0 +1,9 @@ +BF-BROKEN(1) OpenBSD Reference Manual BF-BROKEN(1) + +NNAAMMEE + BBff--bbrrookkeenn - font block broken by another block + +DDEESSCCRRIIPPTTIIOONN + before both [before font block _i_n_s_i_d_e _b_o_t_h] after bracket after both + +OpenBSD November 10, 2012 OpenBSD |