Valloric / MatchTagAlways

A Vim plugin that always highlights the enclosing html/xml tags
http://valloric.github.com/MatchTagAlways/
GNU General Public License v3.0
538 stars 24 forks source link

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

Open hrw opened 7 months ago

hrw commented 7 months ago

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.

mrpeabody commented 4 months ago

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

vitiral commented 3 months ago

easy to fix, replace with r'\S'

I'll open a PR