Skip to content

Bug: E976: Using a Blob as a String when rendering Markdown #451

@pjgoodall

Description

@pjgoodall

🐞 Bug: E976: Using a Blob as a String when rendering Markdown

render-markdown.nvim throws a Lua error every time a Markdown buffer is opened.
The stack trace points to lib/str.lua:23 where vim.fn.strdisplaywidth() is
called with a blob rather than a string.

Some help from ChatGPT o3 in producing this report. The bug is very persistent. Reinstalled markdown support, about 1 hour checking.


Minimal reproducible config

init.lua (drop-in)
-- minimal repro (tested in an empty directory)
vim.opt.runtimepath:prepend(vim.fn.stdpath("data") .. "/render-repro")  -- isolate
vim.cmd("packadd lazy.

![Image](https://github.com/user-attachments/assets/d54e36df-2d2d-47f0-8e56-aed3956e2b4f)

nvim")                                            -- any plugin manager works
require("lazy").setup({
  { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
  { "MeanderingProgrammer/render-markdown.nvim" },  -- ❗ latest HEAD
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions