fix(image): remove ft check, since we use lang already. Closes #1177

This commit is contained in:
Folke Lemaitre 2025-02-14 22:16:19 +01:00
parent 100f8b00f8
commit 4bcd26aca8
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -820,7 +820,6 @@ function M.markdown(buf)
vim.b[buf].snacks_image_attached = true
local file = vim.api.nvim_buf_get_name(buf)
local dir = vim.fs.dirname(file)
assert(vim.bo[buf].filetype == "markdown", "`Image.markdown`: buf should be a markdown buffer")
local parser = vim.treesitter.get_parser(buf)
assert(parser, "`Image.markdown`: treesitter parser not found")
parser:parse(true)