Skip to content

Commit

Permalink
fix: nil check on clean_up_block_value
Browse files Browse the repository at this point in the history
While editing you could create

```yaml

something:

```

and as soon as you hit `:` it would hit `nil` at clean_up_block_value
  • Loading branch information
joshzcold committed Aug 6, 2024
1 parent 77aa881 commit a8c831e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/yaml_nvim/pair.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8c831e

Please sign in to comment.