yaml: fix blank_yaml_blocks re-adding blank lines on repeat saves
This commit is contained in:
@@ -33,7 +33,7 @@ return {
|
||||
},
|
||||
blank_yaml_blocks = {
|
||||
command = "awk",
|
||||
args = { "{ if (NR>1 && $0 ~ /^[A-Za-z_][A-Za-z0-9_.-]*:/) print \"\"; print }" },
|
||||
args = { "{ if (NR>1 && $0 ~ /^[A-Za-z_][A-Za-z0-9_.-]*:/ && prev != \"\") print \"\"; print; prev = $0 }" },
|
||||
stdin = true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user