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

[CI:DOCS] Fix long option format on docs.podman.io #9856

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Mar 29, 2021

Escape the two dashes, otherwise they are combined into one long dash.
I tested that this change is safe and still renders correctly on github
and with the man pages.

This commit also contains a small change to make it build locally.
Assuming you have the dependencies installed you can do:

cd docs
make html

Preview the html files in docs/build/html with
python -m http.server 8000 --directory build/html.

Fixes containers/podman.io#373

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 29, 2021
@Luap99
Copy link
Member Author

Luap99 commented Mar 29, 2021

@TomSweeneyRedHat @eriksjolund PTAL

Escape the two dashes, otherwise they are combined into one long dash.
I tested that this change is safe and still renders correctly on github
and with the man pages.

This commit also contains a small change to make it build locally.
Assuming you have the dependencies installed you can do:
```
cd docs
make html
```
Preview the html files in docs/build/html with
`python -m http.server 8000 --directory build/html`.

Fixes containers/podman.io#373

Signed-off-by: Paul Holzinger <[email protected]>
@mheon
Copy link
Member

mheon commented Mar 29, 2021

LGTM, as long as the manpages still look OK

@rhatdan
Copy link
Member

rhatdan commented Mar 29, 2021

I checked the man pages.
LGTM, although this will be a PITA.
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2021
@openshift-merge-robot openshift-merge-robot merged commit 00792f8 into containers:master Mar 29, 2021
@Luap99 Luap99 deleted the fix-longflag branch March 29, 2021 14:40
@TomSweeneyRedHat
Copy link
Member

@Luap99 thanks for the fix, I was really hoping to avoid backslashing all the arguments and just do add a change in the compilation process to make that happen automatically. This does fix the final issue though.

@edsantiago would there be an easy way to verify in your PR scrubbing script that the double dashes for a long option in any man page changes are backslashed?

@edsantiago
Copy link
Member

@TomSweeneyRedHat already on my TODO list as of this morning; sorry for not having it done already (podman-buildah-bud is keeping me really busy!)

@Luap99
Copy link
Member Author

Luap99 commented Mar 29, 2021

I had to change the hack/xref-helpmsgs-manpages to make the test happy so it should already fail if you do not escape it.

edsantiago added a commit to edsantiago/libpod that referenced this pull request Mar 29, 2021
PR containers#9856 works around a buggy markdown processor that cleverly
converts double dashes to em-dash. The unfortunate result is
that the man page source files are unmaintainable, because
every '--foo' has to be specified as '\-\-foo'. This is
impossible for humans to remember, so let's add a helpful
diagnostic message when we detect new options added without
the escapes.

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago
Copy link
Member

Submitted #9870. @Luap99 I saw your change but was concerned that it would just anger developers, not help them. "Yes, I documented that", they will scream. With #9870 the reason for the error will be clearer. I hope.

jmguzik pushed a commit to jmguzik/podman that referenced this pull request Apr 26, 2021
PR containers#9856 works around a buggy markdown processor that cleverly
converts double dashes to em-dash. The unfortunate result is
that the man page source files are unmaintainable, because
every '--foo' has to be specified as '\-\-foo'. This is
impossible for humans to remember, so let's add a helpful
diagnostic message when we detect new options added without
the escapes.

Signed-off-by: Ed Santiago <[email protected]>
jmguzik pushed a commit to jmguzik/podman that referenced this pull request Apr 26, 2021
Rename Readme.md to README.md in the docs directory.   Add
the local build process per @Luap99 in containers#9856 for the man pages
to preview any changes that are made.

Signed-off-by: TomSweeneyRedHat <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long command-line options are not shown correctly on the man pages
7 participants