Umoxfo / vscode-w3cvalidation

Adds W3C validation support to Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=Umoxfo.vscode-w3cvalidation
MIT License
9 stars 1 forks source link

PHP include .html files - validation errors #8

Open matronator opened 5 years ago

matronator commented 5 years ago

The validator throws errors in .html file snippets that are to be included in another file with PHP's include("header.html"). Example of what I mean:

validationerror

I don't normally work with PHP, so this is not that big of a deal, I just disabled the extension for this one project, BUT...

It would be nice if the extension could somehow recognize that a certain .html file is just a snippet and to not validate it. Maybe if the file is missing doctype, html, head and body tags, it would not validate it, or something like that.

DustinLuck commented 4 years ago

I have a similar use case for Google Apps Scripts (GAS) projects where I've created fragment files and due to GAS only handling js/html files, all of my CSS & JavaScript files have this same issue. I was thinking a good solution might be to allow for a comment like <!--fragment--> to be added at the top of a file to note that it's a fragment.