Skip to content

inconsistent behavior of wrap_comments (merges short lines in lists) #5836

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

Open
xxchan opened this issue Jul 17, 2023 · 2 comments
Open

inconsistent behavior of wrap_comments (merges short lines in lists) #5836

xxchan opened this issue Jul 17, 2023 · 2 comments
Labels
a-comments only-with-option requires a non-default option value to reproduce p-low

Comments

@xxchan
Copy link
Contributor

xxchan commented Jul 17, 2023

 /// a
 ///    b
 ///
 /// a
 /// b
 ///
 /// - a
 /// b
-/// - a
-///   b
+/// - a b
 fn main() {}

Why is only the last one wrapped? Is this expected behavior, or limitation of the implementation?

rustfmt 1.6.0-nightly (0e8e857b 2023-07-16)
@xxchan xxchan changed the title inconsistent behavior of wrap_comments inconsistent behavior of wrap_comments (on lists) Jul 17, 2023
@xxchan
Copy link
Contributor Author

xxchan commented Jul 17, 2023

This is wrapped (we don't want 🤔️)
    // 1. logical_scan ->  logical_join
    //                      /        \
    //                index_scan   primary_table_scan

But this is not.
    //    logical_scan ->  logical_join
    //                      /        \
    //                index_scan   primary_table_scan

@xxchan
Copy link
Contributor Author

xxchan commented Jul 17, 2023

i.e., short lines are only merged for list

@xxchan xxchan changed the title inconsistent behavior of wrap_comments (on lists) inconsistent behavior of wrap_comments (merges short lines in lists) Jul 17, 2023
@ytmimi ytmimi added a-comments only-with-option requires a non-default option value to reproduce p-low labels Jul 17, 2023
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 p-low
Projects
None yet
Development

No branches or pull requests

2 participants