_MarkupText
Whether markup carries text a reader would see; see clipboard_markup_has_text.
Attributes
attributeunshown= 0attributefound= FalseFunctions
constructor__init__()Source Code
def __init__(self):
super().__init__(convert_charrefs=True)
self.unshown = 0
self.found = FalseReturns
Nonefunchandle_starttag(tag, attrs)Source Code
def handle_starttag(self, tag, attrs):
if tag in self._UNSHOWN:
self.unshown += 1paramtagparamattrsReturns
Nonefunchandle_endtag(tag)Source Code
def handle_endtag(self, tag):
if tag in self._UNSHOWN and self.unshown:
self.unshown -= 1paramtagReturns
Nonefunchandle_data(data)Source Code
def handle_data(self, data):
if not self.unshown and data.strip():
self.found = TrueparamdataReturns
None