We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53dcb55 commit d8ec4e4Copy full SHA for d8ec4e4
1 file changed
lua/avante/html2md.lua
@@ -21,7 +21,9 @@ function M.fetch_md(url)
21
local html2md_lib = M._init_html2md_lib()
22
if not html2md_lib then return nil, "Failed to load avante_html2md" end
23
24
- return html2md_lib.fetch_md(url)
+ local ok, res = pcall(html2md_lib.fetch_md, url)
25
+ if not ok then return nil, res end
26
+ return res, nil
27
end
28
29
return M
0 commit comments