You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Configurations.md
+20
Original file line number
Diff line number
Diff line change
@@ -2997,6 +2997,10 @@ See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_s
2997
2997
2998
2998
Break comments to fit on the line
2999
2999
3000
+
Note that no wrapping will happen if:
3001
+
1. The comment is the start of a markdown header doc comment
3002
+
2. An URL was found in the comment
3003
+
3000
3004
-**Default value**: `false`
3001
3005
-**Possible values**: `true`, `false`
3002
3006
-**Stable**: No (tracking issue: [#3347](https://github.com/rust-lang/rustfmt/issues/3347))
@@ -3011,6 +3015,11 @@ Break comments to fit on the line
3011
3015
// commodo consequat.
3012
3016
3013
3017
// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
3018
+
3019
+
// Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text is: lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
3020
+
3021
+
/// # This doc comment is a very long header (it starts with a '#'). Had it not been a header it would have been wrapped. But because it is a header, it will not be. That is because wrapping a markdown header breaks it.
3022
+
structFoo {}
3014
3023
```
3015
3024
3016
3025
#### `true`:
@@ -3021,6 +3030,17 @@ Break comments to fit on the line
3021
3030
// magna aliqua. Ut enim ad minim veniam, quis nostrud
3022
3031
// exercitation ullamco laboris nisi ut aliquip ex ea
3023
3032
// commodo consequat.
3033
+
3034
+
// Lorem ipsum dolor sit amet, consectetur adipiscing elit,
3035
+
// sed do eiusmod tempor incididunt ut labore et dolore
3036
+
// magna aliqua. Ut enim ad minim veniam, quis nostrud
3037
+
// exercitation ullamco laboris nisi ut aliquip ex ea
3038
+
// commodo consequat.
3039
+
3040
+
// Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text is: lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
3041
+
3042
+
/// # This doc comment is a very long header (it starts with a '#'). Had it not been a header it would have been wrapped. But because it is a header, it will not be. That is because wrapping a markdown header breaks it.
0 commit comments