Include summary in dogwhistle detection

merge-requests/30/head
Bob Mottram 2022-07-05 19:49:53 +01:00
parent a5e1d549f3
commit 160ab41a5a
1 changed files with 2 additions and 1 deletions

View File

@ -1562,7 +1562,8 @@ def _add_dogwhistle_warnings(summary: str, content: str,
"""
if not dogwhistles:
return summary
detected = detect_dogwhistles(content, dogwhistles)
content_str = str(summary) + ' ' + content
detected = detect_dogwhistles(content_str, dogwhistles)
if not detected:
return summary