vscode-webvalidation-extension icon indicating copy to clipboard operation
vscode-webvalidation-extension copied to clipboard

[Feat Request] Validate partials

Open hefler opened this issue 3 years ago • 2 comments

It would be nice if this extension also validated HTML partials (without html, head and body tags).

All this tags could be "implied" if not present in an HTML document.

hefler avatar Apr 20 '21 12:04 hefler

I @hefler , do you have a file as an example ?

celian-rib avatar Apr 22 '21 18:04 celian-rib

Let's say this is an HTML file called partials.html.

<div>
    <header>
        <h1>HTML5 Partials</h1>
        <h2>Small bits of HTML</h2>
    </header>
    <main>
        <p>This is a perfect "validatable" piece of HTML code that fails get validated.</p>
        <p>Yet validating partials such as this can be useful. :)</p>
    </main>
</div>

Then in the extension preferences having something like:

Validate partials as:

  • [x] HTML5
  • [ ] XHTML
  • [ ] HTML4

hefler avatar Apr 23 '21 08:04 hefler