Skip to content

Fix issue with handling </> #4007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

facelessuser
Copy link
Contributor

@facelessuser facelessuser commented Jul 2, 2025

Markdown recently made a fix for an issue handling </> which would get stripped out of content. Reference:
Python-Markdown/markdown@64a3c0f

MkDocs uses Markdown's monkey-patched HTMLParser, but does not use the HTML extractor that has the logic to handle the things that have been monkey-patched in. Because of this, MkDocs now fails when parsing </>. This fixes the issue by adding the same logic to handle the issue that Markdown uses.

Fixes #4001

Markdown recently made a fix for an issue handling `</>` which would get
stripped out of content. Reference:
Python-Markdown/markdown@64a3c0f

MkDocs uses Markdown's monkey-patched HTMLParser, but does not use the
HTML extractor that has the logic to handle the things that have been
monkey-patched in. Because of this, MkDocs now fails when parsing
`</>`. This fixes the issue by adding the same logic to handle the issue
that Markdown uses.
@facelessuser
Copy link
Contributor Author

This fixes #4001

@facelessuser
Copy link
Contributor Author

@tomchristie is this project still being maintained? I'd love to see this bug fix get merged and released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssertionError: we should not get here! from html.parser with Python 3.13.5
1 participant