Skip to content

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

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

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 kernc force-pushed the fix-html-block-tag branch from d6018cd to 85c3c11 Compare December 1, 2022 02:35
@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.

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.

kernc added 3 commits December 2, 2022 00:35

Verified

This commit was signed with the committer’s verified signature.
ljharb Jordan Harband

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@kernc kernc force-pushed the fix-html-block-tag branch from 85c3c11 to 1575d1c Compare December 1, 2022 23:39
@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