@@ -166,14 +166,14 @@ if s:Python2Syntax()
166
166
" Python 2 strings
167
167
syn region pythonString matchgroup =pythonQuotes start =+ [bB]\= '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
168
168
syn region pythonString matchgroup =pythonQuotes start =+ [bB]\= "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
169
- syn region pythonString matchgroup =pythonQuotes start =+ [bB]\= """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
170
- syn region pythonString matchgroup =pythonQuotes start =+ [bB]\= '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
169
+ syn region pythonString matchgroup =pythonTripleQuotes start =+ [bB]\= """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
170
+ syn region pythonString matchgroup =pythonTripleQuotes start =+ [bB]\= '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
171
171
else
172
172
" Python 3 byte strings
173
173
syn region pythonBytes matchgroup =pythonQuotes start =+ [bB]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesError,pythonBytesContent,@Spell
174
174
syn region pythonBytes matchgroup =pythonQuotes start =+ [bB]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesError,pythonBytesContent,@Spell
175
- syn region pythonBytes matchgroup =pythonQuotes start =+ [bB]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
176
- syn region pythonBytes matchgroup =pythonQuotes start =+ [bB]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
175
+ syn region pythonBytes matchgroup =pythonTripleQuotes start =+ [bB]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
176
+ syn region pythonBytes matchgroup =pythonTripleQuotes start =+ [bB]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
177
177
178
178
syn match pythonBytesError ' .\+ ' display contained
179
179
syn match pythonBytesContent ' [\u 0000-\u 00ff]\+ ' display contained contains =pythonBytesEscape,pythonBytesEscapeError
@@ -197,27 +197,27 @@ if s:Python2Syntax()
197
197
" Python 2 Unicode strings
198
198
syn region pythonUniString matchgroup =pythonQuotes start =+ [uU]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
199
199
syn region pythonUniString matchgroup =pythonQuotes start =+ [uU]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
200
- syn region pythonUniString matchgroup =pythonQuotes start =+ [uU]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
201
- syn region pythonUniString matchgroup =pythonQuotes start =+ [uU]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
200
+ syn region pythonUniString matchgroup =pythonTripleQuotes start =+ [uU]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
201
+ syn region pythonUniString matchgroup =pythonTripleQuotes start =+ [uU]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
202
202
else
203
203
" Python 3 strings
204
204
syn region pythonString matchgroup =pythonQuotes start =+ '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
205
205
syn region pythonString matchgroup =pythonQuotes start =+ "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
206
- syn region pythonString matchgroup =pythonQuotes start =+ '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
207
- syn region pythonString matchgroup =pythonQuotes start =+ """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
206
+ syn region pythonString matchgroup =pythonTripleQuotes start =+ '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
207
+ syn region pythonString matchgroup =pythonTripleQuotes start =+ """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
208
208
209
209
syn region pythonFString matchgroup =pythonQuotes start =+ [fF]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
210
210
syn region pythonFString matchgroup =pythonQuotes start =+ [fF]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
211
- syn region pythonFString matchgroup =pythonQuotes start =+ [fF]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
212
- syn region pythonFString matchgroup =pythonQuotes start =+ [fF]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
211
+ syn region pythonFString matchgroup =pythonTripleQuotes start =+ [fF]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
212
+ syn region pythonFString matchgroup =pythonTripleQuotes start =+ [fF]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
213
213
endif
214
214
215
215
if s: Python2Syntax ()
216
216
" Python 2 Unicode raw strings
217
217
syn region pythonUniRawString matchgroup =pythonQuotes start =+ [uU][rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
218
218
syn region pythonUniRawString matchgroup =pythonQuotes start =+ [uU][rR]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
219
- syn region pythonUniRawString matchgroup =pythonQuotes start =+ [uU][rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
220
- syn region pythonUniRawString matchgroup =pythonQuotes start =+ [uU][rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
219
+ syn region pythonUniRawString matchgroup =pythonTripleQuotes start =+ [uU][rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
220
+ syn region pythonUniRawString matchgroup =pythonTripleQuotes start =+ [uU][rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
221
221
222
222
syn match pythonUniRawEscape ' \% ([^\\ ]\% (\\\\\) *\)\@ <=\\ u\x\{ 4}' display contained
223
223
syn match pythonUniRawEscapeError ' \% ([^\\ ]\% (\\\\\) *\)\@ <=\\ u\x\{ ,3}\X ' display contained
@@ -227,23 +227,23 @@ endif
227
227
if s: Python2Syntax ()
228
228
syn region pythonRawString matchgroup =pythonQuotes start =+ [bB]\= [rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
229
229
syn region pythonRawString matchgroup =pythonQuotes start =+ [bB]\= [rR]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
230
- syn region pythonRawString matchgroup =pythonQuotes start =+ [bB]\= [rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
231
- syn region pythonRawString matchgroup =pythonQuotes start =+ [bB]\= [rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
230
+ syn region pythonRawString matchgroup =pythonTripleQuotes start =+ [bB]\= [rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
231
+ syn region pythonRawString matchgroup =pythonTripleQuotes start =+ [bB]\= [rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
232
232
else
233
233
syn region pythonRawString matchgroup =pythonQuotes start =+ [rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
234
234
syn region pythonRawString matchgroup =pythonQuotes start =+ [rR]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
235
- syn region pythonRawString matchgroup =pythonQuotes start =+ [rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
236
- syn region pythonRawString matchgroup =pythonQuotes start =+ [rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
235
+ syn region pythonRawString matchgroup =pythonTripleQuotes start =+ [rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
236
+ syn region pythonRawString matchgroup =pythonTripleQuotes start =+ [rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
237
237
238
238
syn region pythonRawFString matchgroup =pythonQuotes start =+ \% ([fF][rR]\| [rR][fF]\) '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
239
239
syn region pythonRawFString matchgroup =pythonQuotes start =+ \% ([fF][rR]\| [rR][fF]\) "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
240
- syn region pythonRawFString matchgroup =pythonQuotes start =+ \% ([fF][rR]\| [rR][fF]\) '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
241
- syn region pythonRawFString matchgroup =pythonQuotes start =+ \% ([fF][rR]\| [rR][fF]\) """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
240
+ syn region pythonRawFString matchgroup =pythonTripleQuotes start =+ \% ([fF][rR]\| [rR][fF]\) '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
241
+ syn region pythonRawFString matchgroup =pythonTripleQuotes start =+ \% ([fF][rR]\| [rR][fF]\) """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
242
242
243
243
syn region pythonRawBytes matchgroup =pythonQuotes start =+ \% ([bB][rR]\| [rR][bB]\) '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
244
244
syn region pythonRawBytes matchgroup =pythonQuotes start =+ \% ([bB][rR]\| [rR][bB]\) "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
245
- syn region pythonRawBytes matchgroup =pythonQuotes start =+ \% ([bB][rR]\| [rR][bB]\) '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
246
- syn region pythonRawBytes matchgroup =pythonQuotes start =+ \% ([bB][rR]\| [rR][bB]\) """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
245
+ syn region pythonRawBytes matchgroup =pythonTripleQuotes start =+ \% ([bB][rR]\| [rR][bB]\) '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
246
+ syn region pythonRawBytes matchgroup =pythonTripleQuotes start =+ \% ([bB][rR]\| [rR][bB]\) """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
247
247
endif
248
248
249
249
syn match pythonRawEscape + \\ ['"]+ display contained
@@ -455,6 +455,7 @@ if v:version >= 508 || !exists('did_python_syn_inits')
455
455
HiLink pythonString String
456
456
HiLink pythonRawString String
457
457
HiLink pythonQuotes String
458
+ HiLink pythonTripleQuotes pythonQuotes
458
459
HiLink pythonRawEscape Special
459
460
460
461
HiLink pythonUniEscape Special
0 commit comments