catleeball/tmnt_wikipedia_bot

Match whole banned words rather than substrings

catleeball opened this issue · 1 comments

Currently if a string in the ban list exists anywhere in the title, including as a substring of a longer word, the title is discarded.

Update this to discard titles where the whole word matches exactly, but not as a substring of a longer word.

Example:

BANNED = ['dog']
title = 'my big dog' # should be discarded
title = 'a dogged load shark' # should not discard

This is resolved by commit acc48a8