fix(tags): yaml tags parsing (closes #142)

This commit is contained in:
lambtho12
2022-06-13 09:14:11 +02:00
parent b2ed311f28
commit 440033919e

View File

@@ -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 = {}