Skip to content

Commit d510d31

Browse files
committed
Fixed highlighting for raw bytes literals
1 parent 825a9e6 commit d510d31

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Revision 3.0.4 (2010-11-09):
2+
3+
- Fixed highlighting for raw bytes literals
4+
15
Revision 3.0.3 (2010-04-09):
26

37
- Applied patch by Andrea Riciputi with new configuration options

python3.0.vim

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
" Language: Python
33
" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
44
" URL: http://www.hlabs.spb.ru/vim/python3.0.vim
5-
" Last Change: 2010-04-09
5+
" Last Change: 2010-11-09
66
" Filenames: *.py
7-
" Version: 3.0.3
7+
" Version: 3.0.4
88
"
99
" Based on python.vim (from Vim 6.1 distribution)
1010
" by Neil Schemenauer <nas@python.ca>
@@ -22,6 +22,8 @@
2222
" for the patch fixing highlighting for decorators
2323
" Andrea Riciputi
2424
" for the patch with new configuration options
25+
" Anton Butanaev
26+
" for the patch fixing raw bytes literals highlighting
2527

2628
"
2729
" Options:
@@ -173,10 +175,10 @@ syn match pythonEscape "\\N{[A-Z ]\+}" display contained
173175
syn match pythonEscapeError "\\N{[^A-Z ]\+}" display contained
174176

175177
" 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
180182

181183
syn match pythonRawEscape +\\['"]+ display transparent contained
182184

test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ class Класс
7676

7777
b"тестtest"
7878

79+
br"test"
80+
81+
br"\a\b"
82+
7983
# Formattings
8084

8185
" %f "

0 commit comments

Comments
 (0)