Skip to content

Doesn't parse files with .xhtml extension #68

@waldyrious

Description

@waldyrious

I can get htmlhint to properly analyze a test.html file with the following contents:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta charset="utf-8" />
    <title>title</title>
  </head>
  <body>
    <p>Lorem ipsum</p>
    <script>
      x = 1;
    </script>
  </body>
</html>

And the following .htmlhintrc:

{
    "jshint": {
        "enforceall": true
    }
}

Running htmlhint -c .htmlhintrc test.html returns, as expected:

/home/waldyrious/test.html:
    line 10, col 7: 'x' is not defined.


1 problems.

But if I simply rename the file to test.xhtml, then the command htmlhint -c .htmlhintrc test.html returns simply No problem.

Given that test/htmlparser.spec.js indicates that it should parse various xhtml flavors, the behavior above seems to be a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions