mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
acfffd3754
- Put headings outside of links in SERP - fix a <div> wrapping issue in the about page - Mark up the result excerpts with a <q> element.
34 lines
1.2 KiB
Text
34 lines
1.2 KiB
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\""))
|
|
)
|
|
or
|
|
( # Allow raw templates
|
|
(.url | test ("/search/index."))
|
|
and (
|
|
(.message == "Text not allowed in element “ol” in this context.")
|
|
or
|
|
(.message == "Bad value “{{ .URL }}” for attribute “href” on element “a”: Illegal character in path segment: “{” is not allowed.")
|
|
or
|
|
(.message == "Bad value “{{ .URL }}” for attribute “cite” on element “q”: Illegal character in path segment: “{” is not allowed.")
|
|
)
|
|
and (
|
|
(.extract | test("{{"))
|
|
or
|
|
(.extract | test("}}"))
|
|
)
|
|
)
|
|
) | not
|
|
)
|
|
) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null)
|