Handle any buffered data.
(self)
| 151 | super().reset() |
| 152 | |
| 153 | def close(self): |
| 154 | """Handle any buffered data.""" |
| 155 | super().close() |
| 156 | if len(self.rawdata): |
| 157 | # Temp fix for https://bugs.python.org/issue41989 |
| 158 | # TODO: remove this when the bug is fixed in all supported Python versions. |
| 159 | if self.convert_charrefs and not self.cdata_elem: # pragma: no cover |
| 160 | self.handle_data(htmlparser.unescape(self.rawdata)) |
| 161 | else: |
| 162 | self.handle_data(self.rawdata) |
| 163 | # Handle any unclosed tags. |
| 164 | if len(self._cache): |
| 165 | self.cleandoc.append(self.md.htmlStash.store(''.join(self._cache))) |
| 166 | self._cache = [] |
| 167 | |
| 168 | @property |
| 169 | def line_offset(self) -> int: |
no test coverage detected