mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix(tags): yaml tags parsing (closes #142)
This commit is contained in:
@@ -82,13 +82,13 @@ local function yaml_to_tags(line, entry, ret)
|
||||
local prev_i = 1
|
||||
local tag
|
||||
while true do
|
||||
i, j = line:find("%s*.*%s*,", i)
|
||||
i, j = line:find("%s*(%S*)%s*,", i)
|
||||
if i == nil then
|
||||
tag = line:sub(prev_i)
|
||||
tag = tag:gsub("%s*(.*)%s*", "%1")
|
||||
tag = tag:gsub("%s*(%S*)%s*", "%1")
|
||||
else
|
||||
tag = line:sub(i, j)
|
||||
tag = tag:gsub("%s*(.*)%s*,", "%1")
|
||||
tag = tag:gsub("%s*(%S*)%s*,", "%1")
|
||||
end
|
||||
|
||||
local new_entry = {}
|
||||
|
||||
Reference in New Issue
Block a user