···4040end
41414242local function get_value(node, bufnr)
4343- if node ~= nil then
4444- local value = node:field("value")[1]
4545- return table.concat({ vim.treesitter.get_node_text(value, bufnr) }, "\n")
4646- else
4343+ if node == nil then
4744 return ""
4845 end
4646+ local value = node:field("value")[1]
4747+ return table.concat({ vim.treesitter.get_node_text(value, bufnr) }, "\n")
4948end
50495150local function is_sequence_block(value)
···110109 local human = string.format("%s = %s", key, cleaned_value)
111110 local start_line, start_col = node:start()
112111 local end_line = start_line
113113- if value_node then
112112+ if value_node ~= nil then
114113 end_line, _ = value_node:end_()
115114 end
116115
+2
tests/sample.yaml
···66 Here comes a two lines
77 text.
8899+ morumbi:
1010+911 semifinals:
1012 - brazil: 1
1113 germany: 7