From 9845d7f8bd1ebf72889ce838d8065dfdb5f0f69b Mon Sep 17 00:00:00 2001 From: poslop Date: Thu, 30 Jul 2026 17:55:54 -0500 Subject: [PATCH] yaml: fix blank_yaml_blocks re-adding blank lines on repeat saves --- lua/plugins/format.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua index 7df0ca6..2fcbdd0 100644 --- a/lua/plugins/format.lua +++ b/lua/plugins/format.lua @@ -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, }, },