mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
get rid of extra newlines
This commit is contained in:
parent
0e2c42d439
commit
2529fa0721
2 changed files with 40 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue