Skip to content

Commit ff52037

Browse files
authored
Merge pull request #41 from afresh1/Respect-MANWIDTH-for-mandoc
Teach perldoc to support MANWIDTH for mandoc
2 parents 9c1c49f + 52ada67 commit ff52037

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
@@ -221,6 +221,10 @@ sub _collect_nroff_switches {
221221
push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80;
222222
}
223223

224+
if( $self->_is_mandoc ) {
225+
push @render_switches, '-Owidth=' . $self->_get_columns;
226+
}
227+
224228
# I hear persistent reports that adding a -c switch to $render
225229
# solves many people's problems. But I also hear that some mans
226230
# don't have a -c switch, so that unconditionally adding it here

0 commit comments

Comments
 (0)