summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bs4/element.py b/bs4/element.py
index d2fa19f..4ff9cd4 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -1156,7 +1156,7 @@ class SoupStrainer(object):
found = markup
else:
found = markup_name
- if found and self.text and self.text != found.string:
+ if found and self.text and not self._matches(found.string, self.text):
found = None
return found
searchTag = search_tag
@@ -1188,7 +1188,7 @@ class SoupStrainer(object):
return found
def _matches(self, markup, match_against):
- # print "Matching %s against %s" % (markup, match_against)
+ #print "Matching %s against %s" % (markup, match_against)
result = False
if isinstance(markup, list) or isinstance(markup, tuple):