Skip to content

Commit bd8c8d9

Browse files
committed
fix: cmnt
1 parent db06867 commit bd8c8d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/fmt/src/state/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ impl<'sess> State<'sess, '_> {
602602

603603
let content = &line[prefix.len()..];
604604
let content = if is_doc {
605-
// Doc comments: emit ALL leading whitespace as breaking spaces to preserve formatting
605+
// Doc comments preserve leading whitespaces (right after the prefix) as nbps.
606606
let ws_len = content.chars().take_while(|&c| c.is_whitespace()).count();
607607
let (leading_ws, rest) = content.split_at(ws_len);
608608
if !leading_ws.is_empty() {

0 commit comments

Comments
 (0)