#NEWLINE# def is_docstring_closed( self , view , position ) : #NEWLINE# #INDENT# 'Checks if the current docstring is supposed to be closed.\n\n        Keep reading lines until we reach the end of the file, class, or function\n        We will assume that if the indentation level is ever lower than present, and no\n        closing docstring has been found yet, the component has ended and needs to be closed\n\n        Arguments:\n            view     {sublime.View} -- Current Sublime Text View\n            position {Integer}      -- Position in the view where the docstring is\n\n        Returns:\n            {Bool} True if the docstring is confirmed closed\n        ' #NEWLINE# indentation_level = view . indentation_level ( current_line ) #NEWLINE# line = view . substr ( view . line ( position ) ) #NEWLINE# match = re . search ( '^\\s*""".*"""\\s*$' , line ) #NEWLINE# if ( match is not None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# for current_line in read_next_line ( view , position ) : #NEWLINE# #INDENT# current_line_string = view . substr ( current_line ) . rstrip ( ) #NEWLINE# if ( len ( current_line_string ) is 0 ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# current_indentation = view . indentation_level ( current_line . end ( ) ) #NEWLINE# if ( current_indentation > indentation_level ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( current_indentation < indentation_level ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if ( re . search ( '^\\s*"""' , current_line_string ) is not None ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# return False