Empty "ignore text" lines could break ignore text and prevent changes from being detected (#3524)

This commit is contained in:
dgtlmoon
2025-10-21 15:54:13 +02:00
committed by GitHub
parent 09914d54a0
commit 785dabd071
+3
View File
@@ -408,6 +408,9 @@ def strip_ignore_text(content, wordlist, mode="content"):
ignored_lines = []
for k in wordlist:
# Skip empty strings to avoid matching everything
if not k or not k.strip():
continue
# Is it a regex?
res = re.search(PERL_STYLE_REGEX, k, re.IGNORECASE)
if res: