Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#169 Upgrade mistune3 #177

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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