Skip to content

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

Merged
waylan merged 3 commits into
Python-Markdown:masterfrom
kernc:fix-html-block-tag
Dec 2, 2022
Merged

Consider <html> a block-level HTML element#1309
waylan merged 3 commits into
Python-Markdown:masterfrom
kernc:fix-html-block-tag

Conversation

@kernc

@kernc kernc commented Nov 30, 2022

Copy link
Copy Markdown
Contributor

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 ...

Comment thread markdown/util.py
@kernc
kernc force-pushed the fix-html-block-tag branch from d6018cd to 85c3c11 Compare December 1, 2022 02:35
@kernc

kernc commented Dec 1, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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.

Comment thread markdown/util.py Outdated

@waylan waylan left a comment

Copy link
Copy Markdown
Member

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
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