Valloric / MatchTagAlways

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

fix #51: use raw string for \S string #52

Open vitiral opened 6 months ago

vitiral commented 6 months ago

This change is Reviewable

vitiral commented 6 months ago

Supported as far back as python 2.6: https://docs.python.org/2.6/reference/lexical_analysis.html#string-literals

jfly commented 2 months ago

Edit: Please ignore, this is already covered in the issue: https://github.com/Valloric/MatchTagAlways/issues/51

This is pretty important for Python 3.12 support, as Python 3.12 has started emitting SyntaxWarnings for this situation:

Python 3.12.4 (main, Jun  6 2024, 18:26:44) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> '\S'
<stdin>:1: SyntaxWarning: invalid escape sequence '\S'
'\\S'

This causes a nasty bootup message when starting vim:

image