(self)
Search for the tag close marker.
        To the right of the type name, there are a few possiblities:
           - a name (handled by the regex's 'block_name')
           - any number of: `=`, `(`, `)`, strings, etc (arguments)
           - nothing

        followed eventually by a %}

        So the only characters we actually have to worry about in this context
        are quote and `%}` - nothing else can hide the %} and be valid jinja.
Search for the tag close marker.
        To the right of the type name, there are a few possiblities:
           - a name (handled by the regex's 'block_name')
           - any number of: `=`, `(`, `)`, strings, etc (arguments)
           - nothing
Search for the tag close marker . To the right of the type name there are a few possiblities : - a name ( handled by the regex s block_name ) - any number of : = ( ) strings etc ( arguments ) - nothing
def _expect_block_close(self):
        """Search for the tag close marker.
        To the right of the type name, there are a few possiblities:
           - a name (handled by the regex's 'block_name')
           - any number of: `=`, `(`, `)`, strings, etc (arguments)
           - nothing

        followed eventually by a %}

        So the only characters we actually have to worry about in this context
        are quote and `%}` - nothing else can hide the %} and be valid jinja.
        """
        while True:
            end_match = self._expect_match(
                'tag close ("%}")',
                QUOTE_START_PATTERN,
                TAG_CLOSE_PATTERN
            )
            self.advance(end_match.end())
            if end_match.groupdict().get('tag_close') is not None:
                return
            # must be a string. Rewind to its start and advance past it.
            self.rewind()
            string_match = self._expect_match('string', STRING_PATTERN)
            self.advance(string_match.end())
def _expect_block_close ( self ) : while True : end_match = self . _expect_match ( 'tag close ("%}")' , QUOTE_START_PATTERN , TAG_CLOSE_PATTERN ) self . advance ( end_match . end ( ) ) if end_match . groupdict ( ) . get ( 'tag_close' ) is not None : return # must be a string. Rewind to its start and advance past it. self . rewind ( ) string_match = self . _expect_match ( 'string' , STRING_PATTERN ) self . advance ( string_match . end ( ) )