From 1eedc95339712975a20d30ba6bd4824c5ee444a7 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 3 Dec 2023 23:47:35 -0800 Subject: [PATCH] Fix whitespace with XHTML parser Remove leading whitespace in codeblocks that only appears when using browser XHTML parsers for some reason. --- scripts/xhtmlize-single-file.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/xhtmlize-single-file.sh b/scripts/xhtmlize-single-file.sh index 9eca7fd..f3a8c00 100644 --- a/scripts/xhtmlize-single-file.sh +++ b/scripts/xhtmlize-single-file.sh @@ -52,5 +52,5 @@ sed 7d "$html_file" | run_xmllint | tail -n +2 >"$tmp_file" -e 's#(]*rel="(nofollow ugc|ugc nofollow)"([^>]*)?>liked)# \1#' \ -e 's#^[\t\s]*<(code|/pre)#<\1#' \ "$tmp_file" \ - | awk '/^<\/code>/{printf "%s",$0;next}7' + | awk '/(^<\/code>|
)/{printf "%s",$0;next}7'
 } >"$html_file"