Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Nov 19, 2024
1 parent 4cf90d0 commit 3526d31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions vlib/v/fmt/fmt.v
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,6 @@ fn (f &Fmt) should_insert_newline_before_node(node ast.Node, prev_node ast.Node)
ast.Block {
if node is ast.Block && !node.is_unsafe && node.pos.line_nr - prev_line_nr > 1 {
return true
} else {
return false
}
}
ast.ConstDecl {
Expand Down
8 changes: 8 additions & 0 deletions vlib/v/fmt/tests/block_with_blank_line_keep.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fn main() {
{
println('(1/3) My first small scope')
//
}

println('hello')
}

0 comments on commit 3526d31

Please sign in to comment.