Skip to content

Conversation

daniel-j-mac
Copy link
Contributor

When using the HTML5 <main> tag as raw HTML in my Markdown file, an extra <p> tag was output.

For example:
<main>...some HTML</main>

turned into:
<p><main>...some HTML</main></p>

The <p> tag ended up creating extra space above the main content.

I added "main" to the BLOCK_LEVEL_ELEMENTS constant in markdown/util.py and this seemed to work well. The <main> tag is recognized and the extra <p> tag is suppressed.

Might this be useful for others?

…nize the <main> tag in raw HTML and suppress generating an extra <p> tag.
@waylan
Copy link
Member

waylan commented Jan 17, 2017

Can you point to the <main> tag in the HTML spec somewhere? Last I checked, we support all of the block level tags in the spec. I'm not interested in adding any arbitrary tag.

@waylan
Copy link
Member

waylan commented Jan 17, 2017

Opps, I see you already linked to the spec. Sorry. Not sure how I missed the <main> tag before.

@waylan waylan merged commit aefad1b into Python-Markdown:master Jan 17, 2017
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.

2 participants