Skip to content

Commit f22810c

Browse files
committed
fix(man): clear need_paragraph unconditionally on non-empty lines
Previously, need_paragraph was only cleared inside the `need_paragraph && !first` branch, so leading empty lines would leave it set and cause a spurious .PP before the second non-empty line. https://claude.ai/code/session_01CrXuWDMVQsiUBoy6ceACsF
1 parent 4f3978a commit f22810c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/man_page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ fn render_paragraph_text(out: &mut String, text: &str) {
168168
}
169169
if need_paragraph && !first {
170170
out.push_str(".PP\n");
171-
need_paragraph = false;
172171
} else if !first {
173172
out.push_str(".br\n");
174173
}
174+
need_paragraph = false;
175175
first = false;
176176
writeln!(out, "{}", roff_escape(line)).unwrap();
177177
}

0 commit comments

Comments
 (0)