Skip to content

Commit 52ada67

Browse files
committed
Teach perldoc to support MANWIDTH for mandoc
The incantation for mandoc to set the width is -Owidth=$MANWIDTH See OpenBSD ToMan.pm r1.11, commitid: l7y5bAdgD9ZaOWMx http://cvsweb.openbsd.org/src/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm?rev=1.11&content-type=text/x-cvsweb-markup
1 parent 74e5032 commit 52ada67

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Pod/Perldoc/ToMan.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ sub _collect_nroff_switches {
227227
push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80;
228228
}
229229

230+
if( $self->_is_mandoc ) {
231+
push @render_switches, '-Owidth=' . $self->_get_columns;
232+
}
233+
230234
# I hear persistent reports that adding a -c switch to $render
231235
# solves many people's problems. But I also hear that some mans
232236
# don't have a -c switch, so that unconditionally adding it here

0 commit comments

Comments
 (0)