From a8c831e94ba9195999d909507a98f058bbe84470 Mon Sep 17 00:00:00 2001 From: Joshua Cold Date: Tue, 6 Aug 2024 17:04:09 -0600 Subject: [PATCH] fix: nil check on clean_up_block_value While editing you could create ```yaml something: ``` and as soon as you hit `:` it would hit `nil` at clean_up_block_value --- lua/yaml_nvim/pair.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/yaml_nvim/pair.lua b/lua/yaml_nvim/pair.lua index 4f30832..1b14a56 100644 --- a/lua/yaml_nvim/pair.lua +++ b/lua/yaml_nvim/pair.lua @@ -16,6 +16,9 @@ local function reverse(keys) end local function clean_up_block_value(value) + if value == nil then + return + end value = string.gsub(value, "\n", " ") if value:sub(1, 1) ~= "|" then