Skip to content

<html> tag wrapped in <p> #1308

Closed
Closed
@kernc

Description

@kernc

Since v3.3 (more precisely, #803 / b701c34), converting the following test document bug-test.txt:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="style.css"/>
  </head>
  <body>

!!! header "foo"
    bar

by running e.g.

markdown_py -o html5 -x extra -x admonition bug-test.txt

results in

<!DOCTYPE html>
<p><html>
  <head>
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="style.css"/>
  </head>
  <body></p>
<div class="admonition header">
<p class="admonition-title">foo</p>
<p>bar</p>
</div>

Prior to v3.3, the result was as expected:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="style.css"/>
  </head>
  <body>

<div class="admonition header">
<p class="admonition-title">foo</p>
<p>bar</p>
</div>

Does the new HTML parser added in #803 perhaps not account for <html> HTML tag?

Metadata

Metadata

Assignees

No one assigned

    Labels

    3rd-partyShould be implemented as a third party extension.invalidInvalid report (user error, upstream issue, etc).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions