@@ -45,6 +45,7 @@ if s:Enabled('g:python_highlight_all')
45
45
call s: EnableByDefault (' g:python_highlight_string_formatting' )
46
46
call s: EnableByDefault (' g:python_highlight_string_format' )
47
47
call s: EnableByDefault (' g:python_highlight_string_templates' )
48
+ call s: EnableByDefault (' g:python_highlight_string_doc' )
48
49
call s: EnableByDefault (' g:python_highlight_indent_errors' )
49
50
call s: EnableByDefault (' g:python_highlight_space_errors' )
50
51
call s: EnableByDefault (' g:python_highlight_doctests' )
@@ -301,6 +302,17 @@ if s:Enabled('g:python_highlight_doctests')
301
302
syn region pythonDocTest2 start =' ^\s *>>>' skip =+ \\ "+ end =+ """+ he =s - 1 end =' ^\s *$' contained
302
303
endif
303
304
305
+ if s: Enabled (' g:python_highlight_string_doc' )
306
+ syn match pythonColon ' :' nextgroup =pythonDocString skipempty
307
+ syn match pythonStartFile + \% ^+ nextgroup =pythonDocString skipempty
308
+ syn region pythonDocString start =+ ^\s *[rRfFbB]\= '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
309
+ syn region pythonDocString start =+ ^\s *[rRfFbB]\= """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
310
+ syn region pythonString start =+ ^\s *[rRfFbB]\= '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
311
+ syn region pythonString start =+ ^\s *[rRfFbB]\= """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
312
+ syn region pythonDocString start =+ \% ^\s *[rRfFbB]\= '''+ skip =+ \\ '+ end =+ '''+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
313
+ syn region pythonDocString start =+ \% ^\s *[rRfFbB]\= """+ skip =+ \\ "+ end =+ """+ keepend contains =pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
314
+ endif
315
+
304
316
"
305
317
" Numbers (ints, longs, floats, complex)
306
318
"
@@ -492,6 +504,7 @@ if v:version >= 508 || !exists('did_python_syn_inits')
492
504
HiLink pythonStrFormatting Special
493
505
HiLink pythonStrFormat Special
494
506
HiLink pythonStrTemplate Special
507
+ HiLink pythonDocString Comment
495
508
496
509
HiLink pythonDocTest Special
497
510
HiLink pythonDocTest2 Special
0 commit comments