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

format_code_in_doc_comments formats non-doc comments #5907

Closed
stepancheg opened this issue Sep 10, 2023 · 2 comments · Fixed by #5536
Closed

format_code_in_doc_comments formats non-doc comments #5907

stepancheg opened this issue Sep 10, 2023 · 2 comments · Fixed by #5536
Labels
a-comments only-with-option requires a non-default option value to reproduce

Comments

@stepancheg
Copy link
Contributor

echo '
// ```
// [
// ]
// ```
' | rustfmt --config format_code_in_doc_comments=true

outputs:

// ```
// []
// ```

This is not a doc comment, so I think it should not be reformatted.

Or at least documentation should be updated.

rustfmt --version
rustfmt 1.6.0-nightly (a991861e 2023-09-05)
@ytmimi
Copy link
Contributor

ytmimi commented Sep 11, 2023

Thanks for reaching out. I just looked into this and I believe #5536 will address this once it's merged

@ytmimi ytmimi added a-comments only-with-option requires a non-default option value to reproduce labels Sep 11, 2023
@ytmimi
Copy link
Contributor

ytmimi commented Sep 11, 2023

linking this to the tracking issue: #3348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments only-with-option requires a non-default option value to reproduce
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants