From 0677ddf78a2d95ec91c8b910c550a5b043fac8ca Mon Sep 17 00:00:00 2001 From: Chris Grieser <73286100+chrisgrieser@users.noreply.github.com> Date: Wed, 4 Dec 2024 21:29:29 +0100 Subject: [PATCH] fix(mdFencedCodeBlock): codeblocks in lists being ignored #78 --- lua/various-textobjs/textobjs/linewise.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/various-textobjs/textobjs/linewise.lua b/lua/various-textobjs/textobjs/linewise.lua index 4600f4c..b874ce9 100644 --- a/lua/various-textobjs/textobjs/linewise.lua +++ b/lua/various-textobjs/textobjs/linewise.lua @@ -88,7 +88,7 @@ end ---@param scope "inner"|"outer" inner excludes the backticks function M.mdFencedCodeBlock(scope) local cursorLnum = vim.api.nvim_win_get_cursor(0)[1] - local codeBlockPattern = "^```%w*$" + local codeBlockPattern = "```%w*$" -- only check end of line, see #78 -- scan buffer for all code blocks, add beginnings & endings to a table each local cbBegin = {}