From 8c3bf160feaa35f933fb0aa8b00bfc18eb56b75e Mon Sep 17 00:00:00 2001 From: njogun Date: Fri, 28 Nov 2014 15:45:42 +0100 Subject: Fix end-of-code-block template token regex --- bottle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bottle.py b/bottle.py index 4459e33..7559244 100644 --- a/bottle.py +++ b/bottle.py @@ -3424,7 +3424,7 @@ class StplParser(object): # 7: Our special 'end' keyword (but only if it stands alone) _re_tok += '|((?:^|;)[ \\t]*end[ \\t]*(?=(?:%(block_close)s[ \\t]*)?\\r?$|;|#))' # 8: A customizable end-of-code-block template token (only end of line) - _re_tok += '|(%(block_close)s[ \\t]*(?=$))' + _re_tok += '|(%(block_close)s[ \\t]*(?=\\r?$))' # 9: And finally, a single newline. The 10th token is 'everything else' _re_tok += '|(\\r?\\n)' -- cgit v1.2.1