From 1af4c729ac6c12cc106c58a77f65bf639fefdd1b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 22 Aug 2022 11:55:59 -0500 Subject: Escaping /should/ work now --- ht.awk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ht.awk b/ht.awk index 8edd800..2d96620 100755 --- a/ht.awk +++ b/ht.awk @@ -33,7 +33,6 @@ $0 ~ CONFIG["raw_delim"] { # Shell expansion escape hatch { - gsub(/\\/, "\\\\", $0) gsub(/\$\$/, "$\a", $0) gsub(/\$[^\a]/, "\\\\&", $0) gsub(/\$\a/, "$", $0) @@ -137,6 +136,8 @@ $0 ~ ("^" COMMENT_DELIM) { $0 = templ } } + # Escape backslash and ` + gsub(/\\/, "\\\\", $0) gsub(/`/, "\\`", $0) # Push to buffer bufpush($0, sep) -- cgit 1.4.1-21-gabe81