mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 01:42:10 +00:00
Remove one extra indent level
We don't need to indent children of <body> or <head> since the element type will give away the parent.
This commit is contained in:
parent
f99c153f72
commit
a2c919ca2e
2 changed files with 3 additions and 3 deletions
|
@ -25,8 +25,8 @@ cleanup() {
|
|||
trap cleanup EXIT
|
||||
|
||||
# delete the stylesheet from the html file; we'll re-insert it later.
|
||||
# Also remove one indentation level
|
||||
sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | sd '^\t' '' >"$tmp_file"
|
||||
# Also remove two indentation levels
|
||||
sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | sd '^\t(?:\t)?' '' >"$tmp_file"
|
||||
{
|
||||
head -n7 "$tmp_file" | sd -s '/>' ' />'
|
||||
cat tmp.css
|
||||
|
|
|
@ -8,7 +8,7 @@ set -e -u
|
|||
output_dir="$1"
|
||||
script_dir="$(dirname "$0")"
|
||||
|
||||
printf '\t<style>%s</style>\n' "$(htmlq -t style <"$output_dir/index.html")" >tmp.css
|
||||
printf '<style>%s</style>\n' "$(htmlq -t style <"$output_dir/index.html")" >tmp.css
|
||||
cleanup() {
|
||||
rm -f "tmp.css"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue