Skip to content

InlineHTML <center> not treated as HTML correctly #1481

Description

@ScriptPup

If <center> has tags nested underneath it, the <center> tag is surrounded by <p> tags, breaking the HTML.

from markdown import markdown
text = """# My Header

<center>
Test
</center>

<center>
<div>Something</div>
</center>

<div>
Test div
</div>

<div>
<p>Some paragraph</p>
</div>

<div>
<article>Some paragraph</article>
</div>

Something else
"""
print(markdown(text))

Results in:

image

It seems like

works correctly, so not 100% why the difference.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionA decision needs to be made regarding request.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions