Browse Source

Fixed highlighting for raw bytes literals

Dmitry Vasiliev 14 years ago
parent
commit
d510d31b02
3 changed files with 16 additions and 6 deletions
  1. 4
    0
      CHANGES.txt
  2. 8
    6
      python3.0.vim
  3. 4
    0
      test.py

+ 4
- 0
CHANGES.txt View File

@@ -1,3 +1,7 @@
1
+Revision 3.0.4 (2010-11-09):
2
+
3
+    - Fixed highlighting for raw bytes literals
4
+
1 5
 Revision 3.0.3 (2010-04-09):
2 6
 
3 7
     - Applied patch by Andrea Riciputi with new configuration options

+ 8
- 6
python3.0.vim View File

@@ -2,9 +2,9 @@
2 2
 " Language:	Python
3 3
 " Maintainer:	Dmitry Vasiliev <dima@hlabs.spb.ru>
4 4
 " URL:		http://www.hlabs.spb.ru/vim/python3.0.vim
5
-" Last Change:	2010-04-09
5
+" Last Change:	2010-11-09
6 6
 " Filenames:	*.py
7
-" Version:	3.0.3
7
+" Version:	3.0.4
8 8
 "
9 9
 " Based on python.vim (from Vim 6.1 distribution)
10 10
 " by Neil Schemenauer <nas@python.ca>
@@ -22,6 +22,8 @@
22 22
 "        for the patch fixing highlighting for decorators
23 23
 "    Andrea Riciputi
24 24
 "        for the patch with new configuration options
25
+"    Anton Butanaev
26
+"        for the patch fixing raw bytes literals highlighting
25 27
 
26 28
 "
27 29
 " Options:
@@ -173,10 +175,10 @@ syn match  pythonEscape	        "\\N{[A-Z ]\+}" display contained
173 175
 syn match  pythonEscapeError	"\\N{[^A-Z ]\+}" display contained
174 176
 
175 177
 " Raw strings
176
-syn region pythonRawString	start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
177
-syn region pythonRawString	start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
178
-syn region pythonRawString	start=+[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
179
-syn region pythonRawString	start=+[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
178
+syn region pythonRawString	start=+[bB]\=[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
179
+syn region pythonRawString	start=+[bB]\=[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
180
+syn region pythonRawString	start=+[bB]\=[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
181
+syn region pythonRawString	start=+[bB]\=[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
180 182
 
181 183
 syn match pythonRawEscape	+\\['"]+ display transparent contained
182 184
 

+ 4
- 0
test.py View File

@@ -76,6 +76,10 @@ b"test"
76 76
 
77 77
 b"тестtest"
78 78
 
79
+br"test"
80
+
81
+br"\a\b"
82
+
79 83
 # Formattings
80 84
 
81 85
 " %f "