Skip to content

Commit

Permalink
squash 169
Browse files Browse the repository at this point in the history
  • Loading branch information
kalbfled committed Sep 30, 2024
1 parent 45ae758 commit 7a381d8
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 2,100 deletions.
5 changes: 3 additions & 2 deletions notifications_utils/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __repr__(self):

class Field:
placeholder_pattern = re.compile(
# this is simply the below regex on one line for easier analysis
# This is the below regex on one line for easier analysis:
# r'\({2}([\w \-]+(?:\?{2}.*?(?!\({2}[\w \-]+\){2}.*?))?)\){2}'
r'\({2}' # opening ((
r'(' # start capture group
Expand Down Expand Up @@ -155,7 +155,8 @@ def replace_match(self, match):
elif replaced_value is not None:
return self.get_replacement(placeholder)

# TODO: investigate why this fallback is necessary and potentially remove to enable truly conditional placeholders
# TODO - Investigate why this fallback is necessary, and potentially remove it to enable
# conditional placeholders.
return self.format_match(match)

def is_okay_to_have_null_values(self, placeholder) -> bool:
Expand Down
Loading

0 comments on commit 7a381d8

Please sign in to comment.