1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

try to get xmllint to print diagnostics

This commit is contained in:
Rohan Kumar 2023-11-26 14:37:07 -08:00
parent 59d6de6a92
commit 8971d74dac
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -25,12 +25,19 @@ cleanup() {
}
trap cleanup EXIT
run_tidy() {
tidy -asxhtml -config linter-configs/tidy.conf 2>/dev/null || true
# run_tidy() {
# tidy -asxhtml -config linter-configs/tidy.conf 2>/dev/null || true
# }
run_xmllint() {
xmllint --format --encode UTF-8 --noent - || {
echo "$html_file"
exit 1
}
}
# delete the stylesheet from the html file; we'll re-insert it later.
sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | tail -n +2 >"$tmp_file"
sed 7d "$html_file" | run_xmllint | tail -n +2 >"$tmp_file"
{
head -n7 "$tmp_file"
cat "${OUTPUT_DIR:?}/tmp.css"