malbertzard / inline-fold.nvim

A neovim version of the inline fold plugin
MIT License
84 stars 2 forks source link

Matches containing `/` causes error #5

Closed b0o closed 1 year ago

b0o commented 1 year ago

With the config suggested in the README, trying to run InlineFoldToggle on this file gives the following error:

<html>
  <body>
    <a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a>
  </body>
</html>
Error executing Lua callback: vim/_editor.lua:0: nvim_exec2(): Vim(syntax):E402: Garbage after pattern: /https://developer.mozilla.org/en-US/docs/Web/CSS/ co
nceal cchar=…
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ...re/nvim/lazy/inline-fold.nvim/lua/inline-fold/module.lua:16: in function 'createConcealMatch'
        ...re/nvim/lazy/inline-fold.nvim/lua/inline-fold/module.lua:60: in function 'updateBuffer'
        ...re/nvim/lazy/inline-fold.nvim/lua/inline-fold/module.lua:82: in function 'toggleHide'
        ...cal/share/nvim/lazy/inline-fold.nvim/lua/inline-fold.lua:17: in function <...cal/share/nvim/lazy/inline-fold.nvim/lua/inline-fold.lua:15>
malbertzard commented 1 year ago

Hi this should be fixed with the latest commit. Special Characters now are getting escaped.