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

Handle escape sequences in doc-comments #173

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

KateMorley
Copy link
Contributor

@KateMorley KateMorley commented Oct 13, 2023

As noted in #159, rustdoc comments may contain CommonMark escape sequences, but argh outputs these literally in the generated help, forcing the user to choose between correct display in rustdoc or in argh’s generated help. This PR unescapes these escape sequences so that the text displayed in argh’s generated help matches that of rustdoc. In addition, braces are escaped as the FromArgs macro uses the resultant string as a format string.

Fixes #159
Fixes #123

argh_derive/src/parse_attrs.rs Outdated Show resolved Hide resolved
@sadmac7000
Copy link
Collaborator

Looks like clippy is unhappy now. It's a bit of an annoying lint, I'm going to see if we can disable it.

@sadmac7000 sadmac7000 merged commit 98c1d9a into google:master Oct 19, 2023
4 of 5 checks passed
@KateMorley KateMorley deleted the unescape branch October 20, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants