Skip to content

Commit ba6b3f2

Browse files
committed
fix: handle empty templates
1 parent d8b6b03 commit ba6b3f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/img-clip/markup.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ end
119119
---@return boolean
120120
function M.insert_markup(input, is_file_path)
121121
local template = M.get_template(input, is_file_path)
122-
if not template then
123-
return false
122+
if not template or template == "" then
123+
return true -- no template found, so do nothing (but we didn't "fail")
124124
end
125125

126126
-- get current cursor position

0 commit comments

Comments
 (0)