Skip to content
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

xml:check-format produces false-positives in some mixed-content scenarios #53

Open
sewe opened this issue Nov 1, 2019 · 3 comments
Open

Comments

@sewe
Copy link

sewe commented Nov 1, 2019

When checking (X)HTML documents for correct indentation, I run into some strange false-positives.

The following minimal (X)HTML document is the result of some systematic exploration on my part. It should explain where I see the false-positives, namely in certain cases of mixed content (as is used when HTML inline elements like <em> are involved):

<html>
  <head>
    <title>Example</title>
  </head>
  <body>
    <p>This validates.</p>
    <p>This does, <em>too.</em></p>
    <p>Paragraphs with multiple lines also validate:
      Like this.</p>
    <p>They even validate when inline elements are involved.
      Like <em>here.</em>
      Nice, isn't it?</p>
    <p>But we hit a bug if the inline elements covers the whole line.
      <em>Like here.</em></p>
    <p>Or if more text follows the inline element:
      <em>Like in the next line.</em>
      See?</p>
    <p>But placing the closing paragraph tag on a different line is (whitespace-wise) different:
      <em>This "workaround" will bite you when using p::after in CSS.</em>
    </p>
  </body>
</html>
@jochenw
Copy link
Member

jochenw commented Dec 2, 2019 via email

@sewe
Copy link
Author

sewe commented Dec 2, 2019

No schema. In fact, XHTML5 doesn't have one.

But AFAIK, xml:check-format just requires well-formedness, not validity, so the schema should be immaterial.

@jochenw
Copy link
Member

jochenw commented Dec 2, 2019 via email

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

No branches or pull requests

2 participants