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

Ignore php blocks #60

Open
senor-developer opened this issue Aug 31, 2014 · 3 comments
Open

Ignore php blocks #60

senor-developer opened this issue Aug 31, 2014 · 3 comments

Comments

@senor-developer
Copy link

Is there any way to tell the validator to skip over php tags? The project I'm currently working on relies heavily on php includes for factorization, but the files are otherwise 99% html.
The validator runs flawless on php files, I just need it to ignore whatever is between

Any ideas?

@BOOMER74
Copy link

BOOMER74 commented Sep 7, 2014

Ignore is not good idea. Need to try execute php and validate output html.

@senor-developer
Copy link
Author

Thanks for the suggestion, I got it to work using grunt-php2html to parse all php files into my .tmp folder and run htmlhint in there.
The only drawback is that (obviously) line numbers are off as the line numbers in my IDE no longer match the parsed html files in .tmp.

Can't think of any workaround right now, but any further suggestions would be much appreciated :)

@paulbhartzog
Copy link

Yes, is there a way to do html validation with grunt on php files other than php2html?

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

3 participants