Skip to content

Commit ba4b62d

Browse files
kdeldyckeclaude
andcommitted
Wrap FILES section paths in .nf/.fi to suppress groff line-adjustment warnings
The FILES section emits long glob patterns like ~/.config/station/{*.toml,*.yaml,...,pyproject.toml} as a single italic token. In fill mode (the default after .SH), groff tries to justify the line and emits "cannot adjust line" when the token is wider than the text area. This caused test_generated_roff_passes_groff_lint to fail on ubuntu-24.04-arm for both the station and forecast fixtures. Wrapping each path in .nf/.fi (no-fill/restore) tells troff not to adjust these lines, matching the same treatment used for \b-marked help text. The separator between multiple entries is changed from .br to .sp for better vertical spacing in no-fill mode. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1fc6e32 commit ba4b62d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

click_extra/man_page.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,10 @@ def to_roff(self) -> str:
358358
lines.append(".SH FILES")
359359
for index, path in enumerate(self.files):
360360
if index > 0:
361-
lines.append(".br")
361+
lines.append(".sp")
362+
lines.append(".nf")
362363
lines.append(_italic(path))
364+
lines.append(".fi")
363365

364366
if self.exit_status:
365367
lines.append('.SH "EXIT STATUS"')

0 commit comments

Comments
 (0)