MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / reset

Method reset

markdown/htmlparser.py:152–164  ·  view source on GitHub ↗

Reset this instance. Loses all unprocessed data.

(self)

Source from the content-addressed store, hash-verified

150 self.md = md
151
152 def reset(self):
153 """Reset this instance. Loses all unprocessed data."""
154 self.inraw = False
155 self.intail = False
156 self.stack: list[str] = [] # When `inraw==True`, stack contains a list of tags
157 self.inline_stack: list[str] = [] # Unclosed raw inline tags in the current paragraph
158 self._cache: list[str] = []
159 self.cleandoc: list[str] = []
160 self.lineno_start_cache = [0]
161 # The `rawdata` and position of the last failed search for a comment close.
162 self._no_commentclose: tuple[str | None, int] = (None, 0)
163
164 super().reset()
165
166 def close(self):
167 """Handle any buffered data."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected