From aef860299a9992fad40495b7d8306750c0db875d Mon Sep 17 00:00:00 2001
From: David Barnes <barnesdavidj@gmail.com>
Date: Thu, 7 Jul 2022 16:10:08 -0400
Subject: [PATCH] Alter comment text to slightly incorrect value since python
 complains about an invalid escape sequence in the middle of a comment and
 raises a warning about it.

---
 django_adminlte_2/templatetags/adminlte_filters.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/django_adminlte_2/templatetags/adminlte_filters.py b/django_adminlte_2/templatetags/adminlte_filters.py
index 7d04b42..fecc14e 100644
--- a/django_adminlte_2/templatetags/adminlte_filters.py
+++ b/django_adminlte_2/templatetags/adminlte_filters.py
@@ -209,13 +209,13 @@ def with_pattern(field, pattern=None):
 
     :param field: Form field to add attributes to.
     :param pattern: The JavaScript regex pattern to use.
-     Defaults to r"\([0-9]{3}\) [0-9]{3}-[0-9]{4}" if value not passed.
+     Defaults to "\\([0-9]{3}\\) [0-9]{3}-[0-9]{4}" if value not passed.
     :return: Field that was passed in with pattern attribute added.
 
     Example::
 
         # Assuming the field has a property called pattern with a string value
-        # that is the needed regex: "\([0-9]{3}\) [0-9]{3}-[0-9]{4}"
+        # that is the needed regex: "\\([0-9]{3}\\) [0-9]{3}-[0-9]{4}"
         # We can send that variable to the filter.
 
         {% load adminlte_filters %}
-- 
GitLab