Remove rustdoc automatic link markup in clap_derive-generated help messages #3019
Closed
2 tasks done
Labels
A-derive
Area: #[derive]` macro API
Please complete the following tasks
Clap Version
3.0.0-beta.5
Describe your use case
When using URLs in doc comments like "see https://repo.com for details", rustdoc emits a warning suggesting the automatic link syntax: "see <https://repo.com\> for details".
When clap uses this doc comment to generate help messages, it outputs the automatic link markup (angle brackets) as it was written instead of removing the markup, leaving only the url in place.
Describe the solution you'd like
Removing the automatic link markup and just using the URL in the help message would be a good solution in my opinion.
One could also consider emitting the ansi control sequence to markup links in the terminal on linux (see this writeup for details, terminal support, etc.) so they are clickable in many terminal emulators.
Alternatives, if applicable
Leaving everything as is, meaning that users who want to use
rustdoc
s automatic links but don't want them to show up in help output would have to duplicate their help message and pass it to#[clap(about = "...")]
or#[clap(long_about = "...")]
.(I haven't checked whether those take preference over doc-comments, if they do not then it would be impossible to have working links in rustdoc while not having the link markup in the clap output?)
Additional Context
No response
The text was updated successfully, but these errors were encountered: