From: Jérôme Benoit Date: Thu, 4 Sep 2025 12:01:12 +0000 (+0200) Subject: fix: properly restore protected MD syntax in all cases X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7317204aa529f858688345ac008fa67c3a12fa1c;p=freqai-strategies.git fix: properly restore protected MD syntax in all cases Signed-off-by: Jérôme Benoit --- diff --git a/scripts/docker-upgrade.sh b/scripts/docker-upgrade.sh index 92c39fe..bfafd7b 100755 --- a/scripts/docker-upgrade.sh +++ b/scripts/docker-upgrade.sh @@ -83,7 +83,7 @@ jsonc_to_json() { escape_telegram_markdown() { printf '%s' "$1" | \ command sed \ - -e 's/\\([][_*()~`>#+=|{}.!-])/MDV2ESC\1/g' | \ + -e 's/\\\([][_*()~`>#+=|{}.!-]\)/MDV2ESC\1/g' | \ command sed \ -e 's/`\([^`]*\)`/MDV2COPEN\1MDV2CCLOSE/g' \ -e 's/\[\([^]]*\)\](\([^)]*\))/MDV2LOPEN\1MDV2LMID\2MDV2LCLOSE/g' \ @@ -105,7 +105,7 @@ escape_telegram_markdown() { -e 's/MDV2IOPEN/_/g' -e 's/MDV2ICLOSE/_/g' \ -e 's/MDV2SOPEN/~/g' -e 's/MDV2SCLOSE/~/g' \ -e 's/MDV2POPEN/||/g' -e 's/MDV2PCLOSE/||/g' \ - -e 's/MDV2ESC\([][_*()~`>#+=|{}.!-]\)/\\\1/g' + -e 's/MDV2ESC\\\([][_*()~`>#+=|{}.!-]\)/\\\1/g' } send_telegram_message() {