mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
cb26956bca
- I forgot to compress xhtml files. fix that. - Stylistic change: remove unnecessary brace expansions - Don't repeatedly append to a file; run commands in a different scope and write all at once. Move Nu HTML validator filtering into a shell script: - Return a bad exit code if validation errors are found after filtering - Remove null-ish values from the JSON output; the final output *should* be an empty string, since nothing should be reported.
18 lines
611 B
Text
18 lines
611 B
Text
# Filter false positives from the .messages entry of Nu Validator output
|
|
.messages |= map(
|
|
. | select(
|
|
.type == "error" and
|
|
(
|
|
( # See https://github.com/w3c/css-validator/issues/361
|
|
.message == "CSS: Parse Error."
|
|
and .extract == "){outline:none}}@media(prefers"
|
|
and .hiliteLength == 1
|
|
)
|
|
or
|
|
( # See https://github.com/validator/validator/issues/1166
|
|
.message == "Attribute “media” not allowed on element “meta” at this point."
|
|
and (.extract | test(" name=\"theme-color\""))
|
|
)
|
|
) | not
|
|
)
|
|
) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null)
|