lowdown icon indicating copy to clipboard operation
lowdown copied to clipboard

broken manpage Name section for commands with subcommands

Open thkoch2001 opened this issue 3 years ago • 1 comments

Given an input file test.md for a command with a subcommand (like e.g. with git):

# Name

git log - does something

lowdown -sT man test.md produces:

.\" -*- mode: troff; coding: utf-8 -*-
.TH "Untitled article" "7" ""
.SH Name
git log - does something

However in the command name the space should be replaced with an underscore: git_log.

Due to this I got a lot of bad-whatis-entry warnings from Debian's lintian tool when packaging nix, which uses lowdown. The lintian explanation says:

Listed items may not contain any spaces. A manual page for a two-level command such as fs listacl must look like fs_listacl so the list is read correctly.

The lexgrog manpage confirms:

Names containing whitespace will be ignored to avoid pathological behaviour on certain ill-formed NAME sections.

thkoch2001 avatar Jan 29 '22 20:01 thkoch2001

Do any other markdown formatters do this, that I can reference?

kristapsdz avatar Jan 29 '22 22:01 kristapsdz

I'm closing this out due to lack of further information. For the record, running pandoc -tman on this same input does the same as lowdown.

kristapsdz avatar Mar 27 '23 22:03 kristapsdz