2022-05-11 17:01:22 +00:00
|
|
|
# Filter false positives from the .messages entry of Nu Validator output
|
|
|
|
.messages |= map(
|
|
|
|
. | select(
|
2023-11-25 21:32:55 +00:00
|
|
|
.type == "info" and (
|
|
|
|
.message == "Trailing slash on void elements has no effect and interacts badly with unquoted attribute values."
|
|
|
|
and (.url | test(".html"))
|
|
|
|
) or
|
2022-12-24 18:11:31 +00:00
|
|
|
.type == "error" and (
|
2022-05-11 17:01:22 +00:00
|
|
|
( # See https://github.com/validator/validator/issues/1166
|
2022-12-24 18:11:31 +00:00
|
|
|
# This false-positive has been fixed; will remove once validator.nu updates
|
|
|
|
# validator.w3.org/nu is up-to-date.
|
2022-05-11 17:01:22 +00:00
|
|
|
.message == "Attribute “media” not allowed on element “meta” at this point."
|
|
|
|
and (.extract | test(" name=\"theme-color\""))
|
2023-11-25 21:32:55 +00:00
|
|
|
) or
|
2022-07-16 05:04:15 +00:00
|
|
|
( # see https://github.com/w3c/css-validator/issues/369
|
|
|
|
.message == "CSS: “contain-intrinsic-size”: Property “contain-intrinsic-size” doesn't exist."
|
2023-11-25 21:32:55 +00:00
|
|
|
) or
|
2022-07-24 18:28:23 +00:00
|
|
|
( # see https://github.com/w3c/css-validator/issues/370
|
|
|
|
.message == "CSS: “contain”: “inline-size” is not a “contain” value."
|
2023-11-25 21:32:55 +00:00
|
|
|
) or
|
2024-01-31 00:38:12 +00:00
|
|
|
( # See https://github.com/w3c/css-validator/issues/361
|
|
|
|
.message == "CSS: Parse Error."
|
|
|
|
and .extract == "not(:focus-visible){outline:no"
|
2024-01-31 01:04:40 +00:00
|
|
|
and (.url | test(".xhtml"))
|
2024-01-31 00:38:12 +00:00
|
|
|
and .hiliteLength == 1
|
|
|
|
) or
|
2023-11-25 21:32:55 +00:00
|
|
|
( # See https://github.com/w3c/css-validator/issues/361
|
|
|
|
.message == "CSS: Parse Error."
|
|
|
|
and .extract == "){outline:none}}@media(prefers"
|
|
|
|
and .hiliteLength == 1
|
2022-07-24 18:28:23 +00:00
|
|
|
)
|
2022-05-11 17:01:22 +00:00
|
|
|
) | not
|
|
|
|
)
|
2022-06-03 00:18:13 +00:00
|
|
|
) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null)
|