View Code? Open in Web Editor
NEW
This is a plugin for Metalsmith that checks HTML pages for HTML5 format compliance via the html-validator module.
Home Page: https://www.npmjs.com/package/metalsmith-formatcheck
License: MIT License
code.metalsmith-formatcheck's People
Contributors
Watchers
code.metalsmith-formatcheck's Issues
The checkedPart
option does not do what is written in the README, it is only used when calculating the MD5 of the file contents:
var file_hash = MD5 ( cheerio . load ( file . contents ) ( config . checkedPart ) . html ( ) ) ;
Based on the README, I would expect a usage such as:
. use ( formatcheck ( {
checkedPart : ':not(img[data-src])'
} ) )
to skip checking the validity of some <img>
tags
I believe the validator url should be updated to provide https. With the default setting I kept getting an ECONNRESET error. I changed the url to "https://validator.w3.org/nu/ " and the issue was resolved.