def _content_matches(element_def, element):
    """ Checks for match of content (if provided), must partially match one of the text items in the element. """
    if not element_def.content:
        return True
    for string in element.strings:
        if string and element_def.content in string:
            return True
    return False
