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