Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roff manpages contain literal ```text blocks #5605

Open
botovq opened this issue Feb 6, 2025 · 2 comments
Open

roff manpages contain literal ```text blocks #5605

botovq opened this issue Feb 6, 2025 · 2 comments

Comments

@botovq
Copy link

botovq commented Feb 6, 2025

As an example, the jj next --help output contains two commit graphs. These are included literally in the jj-next.1 manual as generated by jj util install-manpages. This isn't proper roff markup:

    For example, when the offset is 1:
    .PP
    ```text
    D        D @
    |        |/
    C @  =>  C
    |/       |
    B        B
    ```
    .PP

The result as displayed by a roff formatter (e.g., groff -man -Tascii jj-next.1 | less -R or man) squashes everything onto a single line and is therefore unreadable:

     For example, when the offset is 1:

     ```text D        D @ |        |/ C @  =>  C |/       | B        B ```

I haven't looked at what exactly is involved in generating the manpages, so this might not be a bug in jj itself but rather in one of the crates responsible for the conversion.

@yuja
Copy link
Contributor

yuja commented Feb 6, 2025

This might be addressed by clap. I heard they've added experimental markdown parsing support.

cc @ilyagr

@ilyagr
Copy link
Contributor

ilyagr commented Feb 6, 2025

I haven't actually looked into clap's man page generation. Also cc @bnjmnt4n , not sure if you did.

Re yuya's point, if you are referring to the same feature I'm thinking of, it is discussed in clap-rs/clap#5900 (comment). They have not brought up man pages at all, so I'm not sure if the feature is meant to help with that. If that feature is related to this problem, we should probably point it out in that thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants