Handle any buffered data.
(self)
| 164 | super().reset() |
| 165 | |
| 166 | def close(self): |
| 167 | """Handle any buffered data.""" |
| 168 | super().close() |
| 169 | if len(self.rawdata): |
| 170 | # Temp fix for https://bugs.python.org/issue41989 |
| 171 | # TODO: remove this when the bug is fixed in all supported Python versions. |
| 172 | if self.convert_charrefs and not self.cdata_elem: # pragma: no cover |
| 173 | self.handle_data(htmlparser.unescape(self.rawdata)) |
| 174 | else: |
| 175 | self.handle_data(self.rawdata) |
| 176 | # Handle any unclosed tags. |
| 177 | if len(self._cache): |
| 178 | self.cleandoc.append(self.md.htmlStash.store(''.join(self._cache))) |
| 179 | self._cache = [] |
| 180 | |
| 181 | @property |
| 182 | def line_offset(self) -> int: |
no test coverage detected