Skip to content

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Sep 21, 2023

go-md2man 2.0.2 (not 1.0.10) does not recognize HTML comments, triggering a warning.

Work around that, just to have a silent build.

This uses a "comment" syntax by defining a reference-style link ( https://stackoverflow.com/a/20885980 ).

Alternatively, go-md2man does recognize comments inline inside a paragraph, so preceding the HTML comment with a space would probably work as well.

Either way is weird, and we can't add a comment to explain the comment mechanism... so use the more visually distinct alternative to hopefully minimize regressions; using a leading space would tempt future readers to just remove the space, thinking it's a mistake.

Fixes #2128 .

go-md2man 2.0.2 (not 1.0.10) does not recognize HTML comments,
triggering a warning.

Work around that, just to have a silent build.

This uses a "comment" syntax by defining a reference-style link
( https://stackoverflow.com/a/20885980 ).

Alternatively, go-md2man _does_ recognize comments inline inside
a paragraph, so preceding the HTML comment with a space would probably
work as well.

Either way is _weird_, and we can't add a comment to explain the comment mechanism...
so use the more visually distinct alternative to hopefully minimize regressions;
using a leading space would tempt future readers to just remove the space,
thinking it's a mistake.

Signed-off-by: Miloslav Trmač <[email protected]>
Copy link
Contributor

@rahilarious rahilarious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a rapid one. Awesome. LGTM

@TomSweeneyRedHat
Copy link
Member

LGTM
and indeed weird

@mtrmac
Copy link
Collaborator Author

mtrmac commented Sep 22, 2023

On… second… thought, alternatively, we could actually fix go-md2man. It can’t be difficult; the downside is that we would need to wait for a new release, which is not too bad.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vrothberg
Copy link
Member

Both options are OK to me

@mtrmac
Copy link
Collaborator Author

mtrmac commented Sep 25, 2023

Yeah, let’s fix this at the source instead: cpuguy83/go-md2man#104 .

@mtrmac mtrmac closed this Sep 25, 2023
@mtrmac mtrmac deleted the md2man-html-comments branch September 25, 2023 17:43
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

Successfully merging this pull request may close these issues.

[doc] fix warning when generating man pages with go-md2man

4 participants