support line wrapping in srcset attribute
Often formatters a la Prettier et al will enforce line wrapping on image srcset
attributes, which will cause attribute-allowed-values
validation to fail.
Reduced test-case
Fails:
<img class="awsome-pic"
src="./dist/img/some/long/path/awsome-pic.jpg"
srcset="./dist/img/some/long/path/awsome-pic.jpg 4x,
./dist/img/some/long/path/awsome-pic.jpg 3x,
./dist/img/some/long/path/awsome-pic.jpg 2x,
./dist/img/some/long/path/awsome-pic.jpg 1x"
alt="This is a picure of an awsome thing!" />
Passes:
<img class="awsome-pic"
src="./dist/img/some/long/path/awsome-pic.jpg"
srcset="./dist/img/some/long/path/awsome-pic.jpg 4x, ./dist/img/some/long/path/awsome-pic.jpg 3x, ./dist/img/some/long/path/awsome-pic.jpg 2x, ./dist/img/some/long/path/awsome-pic.jpg 1x"
alt="This is a picure of an awsome thing!" />
Configuration
{
"elements": ["html5"],
"extends": ["html-validate:recommended"],
"rules": {
"no-conditional-comment": "off",
"void-style": [
"off",
{
"style": "selfclosing"
}
]
}
}
Expected result
I would expect failed example to pass.
Actual result
It failed.
Version
-
html-validate
: html-validate-6.1.3