Code

Ticket #3888: multiline_comments.diff

File multiline_comments.diff, 771 bytes (added by tonnzor <tonn81@…>, 7 years ago)

Multiline comments

Line 
1Index: __init__.py
2===================================================================
3--- __init__.py (revision 5099)
4+++ __init__.py (working copy)
5@@ -88,7 +88,7 @@
6 UNKNOWN_SOURCE="&lt;unknown source&gt;"
7 
8 # match a variable or block tag and capture the entire tag, including start/end delimiters
9-tag_re = re.compile('(%s.*?%s|%s.*?%s|%s.*?%s)' % (re.escape(BLOCK_TAG_START), re.escape(BLOCK_TAG_END),
10+tag_re = re.compile('(%s.*?%s|%s.*?%s|%s[\s\S]*?%s)' % (re.escape(BLOCK_TAG_START), re.escape(BLOCK_TAG_END),
11                                           re.escape(VARIABLE_TAG_START), re.escape(VARIABLE_TAG_END),
12                                           re.escape(COMMENT_TAG_START), re.escape(COMMENT_TAG_END)))
13 # matches if the string is valid number