From 26025d928c664084417f70db718d866feafc3902 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 27 Nov 2023 12:27:14 -0800 Subject: [PATCH] re-introduce awk cmd previously thought obsolete --- scripts/xhtmlize-single-file.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/xhtmlize-single-file.sh b/scripts/xhtmlize-single-file.sh index 48c4d69..9eca7fd 100644 --- a/scripts/xhtmlize-single-file.sh +++ b/scripts/xhtmlize-single-file.sh @@ -51,5 +51,6 @@ sed 7d "$html_file" | run_xmllint | tail -n +2 >"$tmp_file" -e 's|([a-z])(]*rel="(nofollow ugc|ugc nofollow)"([^>]*)?>liked)# \1#' \ -e 's#^[\t\s]*<(code|/pre)#<\1#' \ - "$tmp_file" + "$tmp_file" \ + | awk '/^<\/code>/{printf "%s",$0;next}7' } >"$html_file"