Skip to content

Commit

Permalink
Merge pull request #10 from olcf/bugfix/conditional_removes_line
Browse files Browse the repository at this point in the history
False conditionals now evaluate to ''
  • Loading branch information
AcerP-py authored Sep 20, 2024
2 parents 9a76162 + 29cb0f9 commit 85de639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/velocity/_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _filter_content(cls, image: Image, text: str) -> str:
if image.satisfies(res.group(2)):
text = re_sub(r"(\?\?.*\?\?)", res.group(3).strip(), text)
else:
text = ""
text = re_sub(r"(\?\?.*\?\?)", "", text)

# remove comments, newlines, and superfluous white space
text = re_sub(r">>>.*", "", text)
Expand Down

0 comments on commit 85de639

Please sign in to comment.