Skip to content

Commit 5e05fbf

Browse files
committed
Merge pull request python-mode#315 from chuwy/hi-docstring
Docstring syntax
2 parents 6e86135 + 3b54f6b commit 5e05fbf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

syntax/python.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ endif
224224
syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained
225225
endif
226226

227+
" DocStrings
228+
if !pymode#Default('g:pymode_syntax_docstrings', g:pymode_syntax_all) || g:pymode_syntax_docstrings
229+
syn region pythonDocstring start=+^\s*[uU]\?[rR]\?"""+ end=+"""+ keepend excludenl contains=pythonEscape,@Spell,pythonDoctest,pythonDocTest2,pythonSpaceError
230+
syn region pythonDocstring start=+^\s*[uU]\?[rR]\?'''+ end=+'''+ keepend excludenl contains=pythonEscape,@Spell,pythonDoctest,pythonDocTest2,pythonSpaceError
231+
endif
232+
233+
227234
" }}}
228235

229236
" Numbers {{{

0 commit comments

Comments
 (0)