mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: keep top level comments on their own lines
This commit is contained in:
parent
29943d7a91
commit
37d51e8d74
@ -1080,7 +1080,7 @@ pub fn (mut f Fmt) comment(node ast.Comment) {
|
||||
} else {
|
||||
s = '// ' + s
|
||||
}
|
||||
if !is_separate_line {
|
||||
if !is_separate_line && f.indent > 0 {
|
||||
f.remove_new_line() // delete the generated \n
|
||||
f.write(' ')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user