juhp / cabal-rpm

Haskell Cabal RPM packaging tool
https://hackage.haskell.org/package/cabal-rpm
GNU General Public License v3.0
25 stars 8 forks source link

cabal-rpm.1.md: SYNOPSIS is a single paragraph, a subject to reflow #58

Closed van-de-bugger closed 5 years ago

van-de-bugger commented 5 years ago

This file is a markdown source. What the tool should be used to generate man page?

In case of pandoc there is a bug in SYNOPSIS section. The source code looks like:

# SYNOPSIS
cabal-rpm [*options*] spec [*path-or-pkg*]
cabal-rpm [*options*] local [*path-or-pkg*]
cabal-rpm [*options*] srpm [*path-or-pkg*]
...

All these command lines look ok in markdown, but this is a single paragraph, a subject to reflow. Being processed by pandoc and man (groff), it will look like

SYNOPSIS
    cabal-rpm   [options]  spec  [path-or-pkg]  cabal-rpm  [options]  local
    [path-or-pkg] cabal-rpm [options]  srpm  [path-or-pkg]  cabal-rpm  [op-
    tions]  prep  [path-or-pkg]  cabal-rpm [options] builddep [path-or-pkg]
    cabal-rpm [options] install [path-or-pkg] cabal-rpm  [options]  depends
    [path-or-pkg] cabal-rpm [options] requires [path-or-pkg] cabal-rpm [op-
    tions] missingdeps [path-or-pkg] cabal-rpm [options] diff [path-or-pkg]
    cabal-rpm  [options]  update  [path-or-pkg] cabal-rpm [options] refresh
    [path-or-pkg]

Hard linebreaks must be used to avoid such mess:

# SYNOPSIS
cabal-rpm [*options*] spec [*path-or-pkg*] \
cabal-rpm [*options*] local [*path-or-pkg*] \
...
cabal-rpm [*options*] update [*path-or-pkg*] \
cabal-rpm [*options*] refresh [*path-or-pkg*]

The last line should not have linebreak.

juhp commented 5 years ago

Thank you very much for reporting this.