mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
post-processing: minor fixes
This commit is contained in:
parent
69b9aa9d52
commit
25684aa384
1 changed files with 4 additions and 3 deletions
|
@ -32,11 +32,12 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - | tail -n +2 | s
|
||||||
cat "$OUTPUT_DIR/tmp.css"
|
cat "$OUTPUT_DIR/tmp.css"
|
||||||
# shellcheck disable=SC2016 # these are regex statements, not shell expressions
|
# shellcheck disable=SC2016 # these are regex statements, not shell expressions
|
||||||
tail -n +8 "$tmp_file" \
|
tail -n +8 "$tmp_file" \
|
||||||
| sd '<pre(?: tabindex="0")?>\n\t*<(code|samp)( |>)' '<pre tabindex="0"><$1$2' \
|
| sd '<pre(?: tabindex="0")?>\n(?:\t|\s)*<(code|samp)( |>)' '<pre tabindex="0"><$1$2' \
|
||||||
| sd '(?:\n)?</(code|samp)>\n(?:[\t\s]*)?</pre>' '</$1></pre>' \
|
| sd '(?:\n)?</(code|samp)>\n(?:[\t\s]*)?</pre>' '</$1></pre>' \
|
||||||
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
|
| sd '</span>(?: )?.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
|
||||||
|
| sd -s ' ' ' ' \
|
||||||
| sd -f m 'class="u-photo photo"[^<]*<' 'class="u-photo photo"/> <' \
|
| sd -f m 'class="u-photo photo"[^<]*<' 'class="u-photo photo"/> <' \
|
||||||
| sd '([a-z])<(data|time)' '$1 <$2' \
|
| sd '([a-z])<(data|time)' '$1 <$2' \
|
||||||
| sd '</span>(<a[^>]*rel="(?:nofollow ugc|ugc nofollow)"(?:[^>]*)?>liked</a>)' '</span> $1' \
|
| sd '</span>(<a[^>]*rel="(?:nofollow ugc|ugc nofollow)"(?:[^>]*)?>liked</a>)' '</span> $1' \
|
||||||
| sd -s '/>' ' />'
|
| sd '([^ ])/>' '$1 />'
|
||||||
} >"$html_file"
|
} >"$html_file"
|
||||||
|
|
Loading…
Reference in a new issue