get rid of extra newlines

This commit is contained in:
Aidan 2024-07-29 11:10:16 -04:00
parent 0e2c42d439
commit 2529fa0721
2 changed files with 40 additions and 19 deletions

View file

@ -604,16 +604,17 @@ pub fn fmt_annotated_body_comment<'a>(
}
for comment_or_newline in comment_iter {
buf.newline();
match comment_or_newline {
roc_parse::ast::CommentOrNewline::Newline => (),
roc_parse::ast::CommentOrNewline::DocComment(comment_str) => {
buf.newline();
buf.indent(indent);
buf.push_str("# #");
buf.spaces(1);
buf.push_str(comment_str.trim());
}
roc_parse::ast::CommentOrNewline::LineComment(comment_str) => {
buf.newline();
buf.indent(indent);
buf.push_str("#");
buf.spaces(1);