diff --git a/lua/telekasten.lua b/lua/telekasten.lua index f5f14f3..bf9eb1d 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -191,24 +191,20 @@ local function random_variable(length) end local function get_uuid(opts) - opts.prefix_title_by_uuid = opts.prefix_title_by_uuid - or M.Cfg.prefix_title_by_uuid opts.uuid_type = opts.uuid_type or M.Cfg.uuid_type local uuid - if opts.prefix_title_by_uuid then - if opts.uuid_type ~= "rand" then - uuid = os.date(opts.uuid_type) - else - uuid = random_variable(6) - end + if opts.uuid_type ~= "rand" then + uuid = os.date(opts.uuid_type) + else + uuid = random_variable(6) end return uuid end local function concat_uuid_title(uuid, title) local sep = M.Cfg.uuid_sep or "-" - if uuid == nil then + if uuid == nil or not M.Cfg.prefix_title_by_uuid then return title else return uuid .. sep .. title