@@ -164,16 +164,16 @@ endif
164164
165165if s: Python2Syntax ()
166166 " Python 2 strings
167- syn region pythonString start =+ [bB]\= '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
168- syn region pythonString start =+ [bB]\= "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
169- syn region pythonString start =+ [bB]\= """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
170- syn region pythonString start =+ [bB]\= '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
167+ syn region pythonString matchgroup = pythonQuotes start =+ [bB]\= '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
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
171171else
172172 " Python 3 byte strings
173- syn region pythonBytes start =+ [bB]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesError,pythonBytesContent,@Spell
174- syn region pythonBytes start =+ [bB]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesError,pythonBytesContent,@Spell
175- syn region pythonBytes start =+ [bB]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
176- syn region pythonBytes start =+ [bB]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
173+ syn region pythonBytes matchgroup = pythonQuotes start =+ [bB]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesError,pythonBytesContent,@Spell
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
177177
178178 syn match pythonBytesError ' .\+ ' display contained
179179 syn match pythonBytesContent ' [\u 0000-\u 00ff]\+ ' display contained contains =pythonBytesEscape,pythonBytesEscapeError
@@ -195,55 +195,55 @@ syn match pythonUniEscapeError '\\N{[^A-Z ]\+}' display contained
195195
196196if s: Python2Syntax ()
197197 " Python 2 Unicode strings
198- syn region pythonUniString start =+ [uU]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
199- syn region pythonUniString start =+ [uU]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
200- syn region pythonUniString start =+ [uU]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
201- syn region pythonUniString start =+ [uU]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
198+ syn region pythonUniString matchgroup = pythonQuotes start =+ [uU]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
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
202202else
203203 " Python 3 strings
204- syn region pythonString start =+ '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
205- syn region pythonString start =+ "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
206- syn region pythonString start =+ '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
207- syn region pythonString start =+ """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
208-
209- syn region pythonFString start =+ [fF]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
210- syn region pythonFString start =+ [fF]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
211- syn region pythonFString start =+ [fF]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
212- syn region pythonFString start =+ [fF]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
204+ syn region pythonString matchgroup = pythonQuotes start =+ '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
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
208+
209+ syn region pythonFString matchgroup = pythonQuotes start =+ [fF]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
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
213213endif
214214
215215if s: Python2Syntax ()
216216 " Python 2 Unicode raw strings
217- syn region pythonUniRawString start =+ [uU][rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
218- syn region pythonUniRawString start =+ [uU][rR]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
219- syn region pythonUniRawString start =+ [uU][rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
220- syn region pythonUniRawString start =+ [uU][rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
217+ syn region pythonUniRawString matchgroup = pythonQuotes start =+ [uU][rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
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
221221
222222 syn match pythonUniRawEscape ' \% ([^\\ ]\% (\\\\\) *\)\@ <=\\ u\x\{ 4}' display contained
223223 syn match pythonUniRawEscapeError ' \% ([^\\ ]\% (\\\\\) *\)\@ <=\\ u\x\{ ,3}\X ' display contained
224224endif
225225
226226" Python 2/3 raw strings
227227if s: Python2Syntax ()
228- syn region pythonRawString start =+ [bB]\= [rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
229- syn region pythonRawString start =+ [bB]\= [rR]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
230- syn region pythonRawString start =+ [bB]\= [rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
231- syn region pythonRawString start =+ [bB]\= [rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
228+ syn region pythonRawString matchgroup = pythonQuotes start =+ [bB]\= [rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
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
232232else
233- syn region pythonRawString start =+ [rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
234- syn region pythonRawString start =+ [rR]"+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
235- syn region pythonRawString start =+ [rR]'''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
236- syn region pythonRawString start =+ [rR]"""+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
237-
238- syn region pythonRawFString start =+ \% ([fF][rR]\| [rR][fF]\) '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
239- syn region pythonRawFString start =+ \% ([fF][rR]\| [rR][fF]\) "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
240- syn region pythonRawFString start =+ \% ([fF][rR]\| [rR][fF]\) '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
241- syn region pythonRawFString start =+ \% ([fF][rR]\| [rR][fF]\) """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
242-
243- syn region pythonRawBytes start =+ \% ([bB][rR]\| [rR][bB]\) '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
244- syn region pythonRawBytes start =+ \% ([bB][rR]\| [rR][bB]\) "+ skip =+ \\\\\|\\ "\|\\ $+ excludenl end =+ "+ end =+ $+ keepend contains =pythonRawEscape,@Spell
245- syn region pythonRawBytes start =+ \% ([bB][rR]\| [rR][bB]\) '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonDocTest,pythonSpaceError,@Spell
246- syn region pythonRawBytes start =+ \% ([bB][rR]\| [rR][bB]\) """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonDocTest2,pythonSpaceError,@Spell
233+ syn region pythonRawString matchgroup = pythonQuotes start =+ [rR]'+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
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
237+
238+ syn region pythonRawFString matchgroup = pythonQuotes start =+ \% ([fF][rR]\| [rR][fF]\) '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
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
242+
243+ syn region pythonRawBytes matchgroup = pythonQuotes start =+ \% ([bB][rR]\| [rR][bB]\) '+ skip =+ \\\\\|\\ '\|\\ $+ excludenl end =+ '+ end =+ $+ keepend contains =pythonRawEscape,@Spell
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
247247endif
248248
249249syn match pythonRawEscape + \\ ['"]+ display contained
@@ -454,6 +454,7 @@ if v:version >= 508 || !exists('did_python_syn_inits')
454454
455455 HiLink pythonString String
456456 HiLink pythonRawString String
457+ HiLink pythonQuotes String
457458 HiLink pythonRawEscape Special
458459
459460 HiLink pythonUniEscape Special
0 commit comments