-
Notifications
You must be signed in to change notification settings - Fork 925
doc_comment_code_block_width
doesn't work in inner comments
#5461
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
Comments
Please update the issue description with a valid, minimal snippet that reproduces the behavior you are describing, along with relevant details like the version of rustfmt you are using and your config file |
@robertbastian I think we still need more context in order to figure out what's going on. Could you please provide a complete snippet where you're experiencing this problem. Also as @calebcartwright mentioned having the version of rustfmt and any relevant configuration options your using besides |
Updated |
Thank you for updating, but I'm unable to reproduce using rustfmt from source, the latest nightly, nor even stable for that matter. There haven't been any released changes to rustfmt in the last ~2 weeks either so I don't think the latest nightly 7-21 vs 7-19 will make a difference. Are you sure that nightly rustfmt is being invoked, and that $ rustfmt +nightly --version
rustfmt 1.5.1-nightly (62b272d 2022-07-21)
$ rustfmt +nightly lib.rs --check --config format_code_in_doc_comments=true
Diff in /......................../lib.rs at line 1:
mod foo {
- //! ```
- //! horribly .formatted(code
- //! );
- //! ```
+ //! ```
+ //! horribly.formatted(code);
+ //! ```
} |
Oh sorry I don't seem to have invoked |
format_code_in_doc_comments
doesn't work in inner commentsdoc_comment_code_block_width
doesn't work in inner comments
Could you elaborate a little more on what you types of formatting you tried messing with?
Are you saying that |
I introduced a space in some |
Alright, I'll try to take a look into this at some point. For now going to link the tracking issues for |
Code blocks in a
//!
doc comment don't seem to be formatted.This is on nightly 2022-07-19 and on an older one as well.
The text was updated successfully, but these errors were encountered: