Skip to content
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

Consider <html> a block-level HTML element #1309

Merged
merged 3 commits into from Dec 2, 2022

Conversation

kernc
Copy link
Contributor

@kernc kernc commented Nov 30, 2022

Fixes #1308

I'm obviously :+1: on adding <html> to block-level elements. Literal HTML is valid syntax in markdown, and the specification for DocumentFragment doesn't mention any limits wrt what particular nodes the fragment is or isn't allowed to consist of ...

@kernc
Copy link
Contributor Author

kernc commented Dec 1, 2022

FTR, some older third parties seem to use BLOCK_LEVEL_ELEMENTS list incompatibly:
https://github.com/HEInventions/docnado/blob/7e474a34036248fa773f9487be21252db03a7b5f/docnado/docnado.py#L348-L356

@facelessuser
Copy link
Collaborator

FTR, some older third parties seem to use BLOCK_LEVEL_ELEMENTS list incompatibly:

We can't really control how people monkey patch the lib. Once you start monkey patching like they do, you are on your own.

markdown/util.py Outdated Show resolved Hide resolved
Copy link
Member

@waylan waylan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add a comment to the changelog indicating that the list of block-level-elements was changed.

@waylan waylan merged commit a8ad6fc into Python-Markdown:master Dec 2, 2022
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.

<html> tag wrapped in <p>
3 participants