Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hrw opened this issue Nov 30, 2023 · 2 comments
Open

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

hrw opened this issue Nov 30, 2023 · 2 comments

Comments

@hrw
Copy link

hrw commented Nov 30, 2023

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
Copy link

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

@vitiral
Copy link

vitiral commented Mar 28, 2024

easy to fix, replace with r'\S'

I'll open a PR

vitiral added a commit to vitiral/MatchTagAlways that referenced this issue Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants