Ticket #1147: patch.2.diff

File patch.2.diff, 1.0 KB (added by jim-django@…, 18 years ago)

Patch to allow newlines inside tags (corrected)

  • __init__.py

     
    8080# (e.g. strings)
    8181UNKNOWN_SOURCE="<unknown source>"
    8282
    83 # match a variable or block tag and capture the entire tag, including start/end delimiters
    84 tag_re = re.compile('(%s.*?%s|%s.*?%s)' % (re.escape(BLOCK_TAG_START), re.escape(BLOCK_TAG_END),
    85                                           re.escape(VARIABLE_TAG_START), re.escape(VARIABLE_TAG_END)))
    86 
     83# match a variable or block tag and capture the entire tag, including start/end delimiters                                       
     84tag_re = re.compile('(%s.*?%s|%s.*?%s)' % (re.escape(BLOCK_TAG_START),
     85                                            re.escape(BLOCK_TAG_END),
     86                                            re.escape(VARIABLE_TAG_START),
     87                                            re.escape(VARIABLE_TAG_END)),
     88                                          re.DOTALL)
     89                                         
Back to Top