mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 17:52:11 +00:00
Fix whitespace with XHTML parser
Remove leading whitespace in codeblocks that only appears when using browser XHTML parsers for some reason.
This commit is contained in:
parent
319051e126
commit
1eedc95339
1 changed files with 1 additions and 1 deletions
|
@ -52,5 +52,5 @@ sed 7d "$html_file" | run_xmllint | tail -n +2 >"$tmp_file"
|
|||
-e 's#</span>(<a[^>]*rel="(nofollow ugc|ugc nofollow)"([^>]*)?>liked</a>)#</span> \1#' \
|
||||
-e 's#^[\t\s]*<(code|/pre)#<\1#' \
|
||||
"$tmp_file" \
|
||||
| awk '/^<\/code>/{printf "%s",$0;next}7'
|
||||
| awk '/(^<\/code>|<pre tabindex="0">)/{printf "%s",$0;next}7'
|
||||
} >"$html_file"
|
||||
|
|
Loading…
Reference in a new issue