-
Notifications
You must be signed in to change notification settings - Fork 888
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
wrap_comments with a *numbered* markdown list #5416
Comments
Thanks for the report. rustfmt's support for markdown constructs is fairly limited, and there isn't any support for numbered lists. We currently handle bulleted lists ( Lines 433 to 446 in c4416f2
Maybe there's a way to minimally rework it to support numbered lists, but I'm not sure how difficult that would be. |
This issue can be closed |
Repro steps
Step1: Prepare the following
main.rs
file as an input forrustfmt
:Note that the long lines are 98 characters long.
Step2: Run
rustfmt --config wrap_comments=true src/main.rs
Note the usage of
wrap_comments=true
.Expected behavior
Lists remain formatted as lists. This expectation is based on:
Actual behavior.
The list of bullet items remains formatted correctly, but the numbered list is no longer formatted as a list:
I am observing the behavior above when using the following version of
rustfmt
:Workarounds
I guess I can insert a new line between numbered list items. Indentation will still get broken, but at least separate list items will remain separate.
Older, similar issues
A collegue has kindly pointed that there was a similar issue in the past (dealing with lists of bullet items): #3224
The text was updated successfully, but these errors were encountered: