python-bottle/0006-1177-Bug-fix-of-missing-regex-escaped-back-slashes.patch
zhang-liang-pengkun 1f916d590b 1177 Bug fix of missing regex escaped back slashes
Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com>
2023-12-26 19:54:09 +08:00

28 lines
941 B
Diff

From 099c4a2e8bb1e6e2c42056c6aef004024fbd8c7c Mon Sep 17 00:00:00 2001
From: Andrew Hendley <andrew.hendley@jbwere.com>
Date: Tue, 12 Nov 2019 15:25:18 +1100
Subject: [PATCH] #1177 Bug fix of missing regex escaped back slashes
---
bottle.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bottle.py b/bottle.py
index 910b747..9850abb 100644
--- a/bottle.py
+++ b/bottle.py
@@ -3430,8 +3430,8 @@ class StplParser(object):
# 2: Comments (until end of line, but not the newline itself)
_re_tok += '|(#.*)'
# 3,4: Open and close grouping tokens
- _re_tok += '|([\[\{\(])'
- _re_tok += '|([\]\}\)])'
+ _re_tok += '|([\\[\\{\\(])'
+ _re_tok += '|([\\]\\}\\)])'
# 5,6: Keywords that start or continue a python block (only start of line)
_re_tok += '|^([ \\t]*(?:if|for|while|with|try|def|class)\\b)' \
'|^([ \\t]*(?:elif|else|except|finally)\\b)'
--
2.39.0.windows.2