MCPcopy
hub / github.com/Python-Markdown/markdown / reset

Method reset

markdown/core.py:263–277  ·  view source on GitHub ↗

Resets all state variables to prepare the parser instance for new input. Called once upon creation of a class instance. Should be called manually between calls to [`Markdown.convert`][markdown.Markdown.convert].

(self)

Source from the content-addressed store, hash-verified

261 return self
262
263 def reset(self) -> Markdown:
264 """
265 Resets all state variables to prepare the parser instance for new input.
266
267 Called once upon creation of a class instance. Should be called manually between calls
268 to [`Markdown.convert`][markdown.Markdown.convert].
269 """
270 self.htmlStash.reset()
271 self.references.clear()
272
273 for extension in self.registeredExtensions:
274 if hasattr(extension, 'reset'):
275 extension.reset()
276
277 return self
278
279 def set_output_format(self, format: str) -> Markdown:
280 """

Callers 11

__init__Method · 0.95
test_abbr_resetMethod · 0.95
testTOCResetMethod · 0.95
runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
testMetaDataResetMethod · 0.45
testResetMethod · 0.45
testResetMethod · 0.45
test_ancestorsMethod · 0.45
test_ancestors_tailMethod · 0.45

Calls

no outgoing calls

Tested by 7

test_abbr_resetMethod · 0.76
testTOCResetMethod · 0.76
testMetaDataResetMethod · 0.36
testResetMethod · 0.36
testResetMethod · 0.36
test_ancestorsMethod · 0.36
test_ancestors_tailMethod · 0.36