diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-08-02 19:53:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-02 19:53:16 +0200 |
| commit | 9b9c805cedb08621bd5dc58a01a6478eb7cc49a9 (patch) | |
| tree | d819686fbe32fecf4b7c73030f4b7b2f24990adc /django/template | |
| parent | 7cd187a5ba58d7769039f487faeb9a5a2ff05540 (diff) | |
Removed unneeded escapes in regexes.
Special characters lose their special meaning inside sets of characters.
"-" lose its special meaning if it's placed as the first or last
character.
Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1.
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/base.py b/django/template/base.py index 4762d20516..f7e4f94f51 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -632,7 +632,7 @@ filter_raw_string = r""" )? )""" % { "constant": constant_string, - "num": r"[-+\.]?\d[\d\.e]*", + "num": r"[-+.]?\d[\d.e]*", "var_chars": r"\w\.", "filter_sep": re.escape(FILTER_SEPARATOR), "arg_sep": re.escape(FILTER_ARGUMENT_SEPARATOR), |
