Valloric/MatchTagAlways

python/mta_core.py:84: SyntaxWarning: invalid escape sequence '\S'

Opened this issue · 2 comments

hrw commented

Python 3.12 complains:

Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:24: Error executing lua: /usr/share/nvim/runtime/filetype.lua:25: BufReadPost Autocommands for "*"..FileType Autocommands
for "*"..script /home/marcin/.config/nvim/plugged/MatchTagAlways/autoload/MatchTagAlways.vim[31]..function provider#python3#Call[18]..script /home/marcin/.config/nvim/plugged/MatchTagAlways
/autoload/MatchTagAlways.vim, line 31: Vim(return):/home/marcin/.config/nvim/plugged/MatchTagAlways/autoload/../python/mta_core.py:84: SyntaxWarning: invalid escape sequence '\S'
stack traceback:
        [C]: in function 'nvim_cmd'
        /usr/share/nvim/runtime/filetype.lua:25: in function </usr/share/nvim/runtime/filetype.lua:24>
        [C]: in function 'nvim_buf_call'
        /usr/share/nvim/runtime/filetype.lua:24: in function </usr/share/nvim/runtime/filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_buf_call'
        /usr/share/nvim/runtime/filetype.lua:24: in function </usr/share/nvim/runtime/filetype.lua:10>

Probably string needs to be marked as regexp.

same thing happens in the regular vim when running for the first time after installing the plugin

easy to fix, replace with r'\S'

I'll open a PR