Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions markdown/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ def reset(self) -> None:
""" Clear the stash. """
self.html_counter = 0
self.rawHtmlBlocks = []
# Also clear stored tag state so placeholders and tag indices
# don't leak between runs when the same Markdown instance is reused.
self.tag_counter = 0
self.tag_data = []

def get_placeholder(self, key: int) -> str:
return HTML_PLACEHOLDER % key
Expand Down