diff options
-rwxr-xr-x | bottle.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4021,7 +4021,7 @@ class StplParser(object): # This huge pile of voodoo magic splits python code into 8 different tokens. # We use the verbose (?x) regex mode to make this more manageable - _re_tok = _re_inl = r'''(?mx)( # verbose and dot-matches-newline mode + _re_tok = _re_inl = r'''( [urbURB]* (?: ''(?!') |""(?!") @@ -4063,6 +4063,12 @@ class StplParser(object): # Match inline statements (may contain python strings) _re_inl = r'''%%(inline_start)s((?:%s|[^'"\n]+?)*?)%%(inline_end)s''' % _re_inl + # add the flag in front of the regexp to avoid Deprecation warning (see Issue #949) + # verbose and dot-matches-newline mode + _re_tok = '(?mx)' + _re_tok + _re_inl = '(?mx)' + _re_inl + + default_syntax = '<% %> % {{ }}' def __init__(self, source, syntax=None, encoding='utf8'): |