From 9eb523beeddc88be51de094e117737797dbdda5d Mon Sep 17 00:00:00 2001 From: memdmp Date: Sun, 5 Jan 2025 14:06:03 +0100 Subject: fix: make it work? --- image/syntax-highlighting.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'image/syntax-highlighting.sh') diff --git a/image/syntax-highlighting.sh b/image/syntax-highlighting.sh index d119e22..88f59bf 100644 --- a/image/syntax-highlighting.sh +++ b/image/syntax-highlighting.sh @@ -118,8 +118,9 @@ EXTENSION="${BASENAME##*.}" #exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null # This is for version 3 -HIGHLIGHT_THEME="${HIGHLIGHT_THEME:-"$(cat /.highlight-theme)"}" -THEMEOPT=() -if [[ "$HIGHLIGHT_THEME" != "" ]]; then THEMEOPT+=("--style=$HIGHLIGHT_THEME"); fi -exec highlight --force --inline-css "${THEMEOPT[@]}" -f -I -O xhtml -S "$EXTENSION" 2>/dev/null +if [[ "$(cat /.highlight-theme)" != "" ]]; then + exec highlight --force --inline-css "--style=$(cat /.highlight-theme)" -f -I -O xhtml -S "$EXTENSION" 2>/dev/null +else + exec highlight --force --inline-css -f -I -O xhtml -S "$EXTENSION" 2>/dev/null +fi -- cgit v1.2.3