OXY2DEV / markview.nvim

☄️ Highly customisable markdown(latex & inline html) previewer for Neovim
Apache License 2.0
1.37k stars 38 forks source link

🐞 Bug: Constantly getting error when writing html-tag followed by bold/italic text on a numbered list item #179

Open kusnezoff-alexander opened 4 days ago

kusnezoff-alexander commented 4 days ago

Before reporting:

Problem:

Random error occurs constantly when writing a specific line (see Steps to reproduce the issue) with the following error message:

Error executing vim.schedule lua callback: ...al/share/nvim/lazy/markview.nvim/lua/
markview/parser.lua:141: invalid pattern capture                                   
stack traceback:                                                                   
        [C]: in function 'gsub'                                                    
        ...al/share/nvim/lazy/markview.nvim/lua/markview/parser.lua:141: in functio
n 'filter_lines' 

It seems like this error only occurs when writinga html-tag followed by bold/italic text on the line of a numbered list item.

Steps to reproduce the issue:

Create a markdown file test.md with the following content: 2) <u>text</u> *italic* and try to do anything (move cursor/...).

Expected behavior:

No error should occur.

Neovim version:

v0.10.1

kusnezoff-alexander commented 4 days ago

The problem seems to be the with the Regex on this line: (>%s-([+%-*])) which also matches html-tags followed by a star * as Marker items, although they are not.