Ticket #3100: patch-breaking-namedendblocks-in-regressiontests-templates.diff

File patch-breaking-namedendblocks-in-regressiontests-templates.diff, 1.1 KB (added by Daniel Ring, 15 years ago)

patch breaks regressiontests.templates 'namedendblocks0[234]'

  • django/template/__init__.py

    diff --git a/django/template/__init__.py b/django/template/__init__.py
    index 5493e5b..2f47482 100644
    a b class Parser(object):  
    267267                var_node = self.create_variable_node(filter_expression)
    268268                self.extend_nodelist(nodelist, var_node,token)
    269269            elif token.token_type == TOKEN_BLOCK:
    270                 if token.contents in parse_until:
    271                     # put token back on token list so calling code knows why it terminated
    272                     self.prepend_token(token)
    273                     return nodelist
    274270                try:
    275271                    command = token.contents.split()[0]
    276272                except IndexError:
    277273                    self.empty_block_tag(token)
     274                if command in parse_until:
     275                    # put token back on token list so calling code knows why it terminated
     276                    self.prepend_token(token)
     277                    return nodelist
    278278                # execute callback function for this tag and append resulting node
    279279                self.enter_command(command, token)
    280280                try:
Back to Top