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

Markdown syntax problems in manpages #10667

Closed
DanLipsitt opened this issue Feb 9, 2015 · 17 comments · Fixed by cpuguy83/go-md2man#10
Closed

Markdown syntax problems in manpages #10667

DanLipsitt opened this issue Feb 9, 2015 · 17 comments · Fixed by cpuguy83/go-md2man#10

Comments

@DanLipsitt
Copy link

There are errors in the manpages because parameters in angle brackets aren't included in md2man output. For example,

**ADD ["<src>"... "<dest>"]** This form is required for paths containing whitespace.

renders as

ADD [""... ""] This form is required for paths containing whitespace.

Note the missing <src> and <dest>.
This can also be seen in GitHub's rendering of the text:

ADD [""... ""] This form is required for paths containing whitespace.


PROBLEM: man docs are often imporoperly formatted, using quotes or bolds when code blocks/segments are required

PROPOSED SOLUTION: man docs should be updated to use appropriate backticks for either inline or blocked code.
The dockerfile.5.md has already been gone through, but wouldn't hurt another set of eyes.

DanLipsitt referenced this issue Feb 9, 2015
Add tests and documentation for this new feature.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
@jessfraz
Copy link
Contributor

jessfraz commented Feb 9, 2015

ping @cpuguy83

On Mon, Feb 9, 2015 at 12:41 PM, Dan Lipsitt notifications@github.com
wrote:

There are errors in the manpages because parameters in angle brackets
aren't included in md2man output. For example
https://github.com/docker/docker/blame/master/docs/man/Dockerfile.5.md#L137,

ADD [""... ""] This form is required for paths containing whitespace.

renders as

ADD [""... ""] This form is required for paths containing whitespace.

Note the missing and .
This can also be seen in GitHub's rendering of the text:

ADD [""... ""] This form is required for paths containing whitespace.


Reply to this email directly or view it on GitHub
#10667.

@cpuguy83
Copy link
Member

cpuguy83 commented Feb 9, 2015

Thanks, let me take a look.

@tianon
Copy link
Member

tianon commented Feb 9, 2015

Since this isn't fixed in docker/docker yet, I think it's appropriate that we leave this open. 😉

@tianon tianon reopened this Feb 9, 2015
@cpuguy83
Copy link
Member

cpuguy83 commented Feb 9, 2015

Sorry, didn't realize GH would auto-close :)

@cpuguy83
Copy link
Member

cpuguy83 commented Feb 9, 2015

btw, I don't like the fix I put in since it's perfectly valid to use raw html in MD, but I think it's better than not rendering anything at all.

@DanLipsitt
Copy link
Author

What happens if you use backticks to protect the params (<foo>)? Sorry I don't have time to experiment right now.

@thaJeztah
Copy link
Member

Is using <something> the standard way to notate things in man-pages, or a convention that Docker uses?

Asking, because the same problem occurred on a couple of pages of the documentation as well; the values did not show up on GitHub when viewing the docs.

If it is not a standard notation in man-pages, perhaps Docker should use a different convention in stead of modifying md2man, because other MarkDown renderers have the same problem.

@cpuguy83
Copy link
Member

cpuguy83 commented Feb 9, 2015

@thaJeztah It's pretty common when writing CLI docs to use <something> as a way to indicate a required argument (vs [something] as not required)

@duglin
Copy link
Contributor

duglin commented Feb 9, 2015

can md2man be made to support < and > ?

@cpuguy83
Copy link
Member

cpuguy83 commented Feb 9, 2015

@duglin Can you open an issue on the repo with what you expect it to output?

@thaJeztah
Copy link
Member

@cpuguy83 thanks for explaining.

btw, I don't like the fix I put in since it's perfectly valid to use raw html in MD, but I think it's better than not rendering anything at all.

Looking at the man-page on GitHub, the pages look mangled as well. I think the problem overall is that they use a bit of a "MarkDown-ish" syntax; everything is assumed to be "<pre>" and only a sub-set of MarkDown (Head (#), bold and italic) is used.

I think from that perspective, it's reasonable to not support HTML?

@tianon
Copy link
Member

tianon commented Feb 9, 2015 via email

@thaJeztah
Copy link
Member

Perhaps call it MarkDown-flavoured plain-text, and change the file extension to .txt, to make it better readable on GitHub as well.

cpuguy83 added a commit to cpuguy83/docker that referenced this issue Feb 9, 2015
Fixes moby#10667

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 mentioned this issue Feb 9, 2015
@duglin
Copy link
Contributor

duglin commented Feb 10, 2015

Opened issue in md2man: cpuguy83/go-md2man#11

@jessfraz
Copy link
Contributor

so what was the outcome here @cpuguy83 can you triage and add the right labels so someone can contribute it to fix it if they see this issue

@cpuguy83
Copy link
Member

Triaged

@cpuguy83
Copy link
Member

Closing since these man pages were updated.
If anyone sees a specific problem, please open a new issue with that specific problem.

Thanks!

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

Successfully merging a pull request may close this issue.

7 participants