Skip to content

Commit

Permalink
strip white space from bat opts before checking if empty
Browse files Browse the repository at this point in the history
Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
  • Loading branch information
suvayu and nobu authored Sep 22, 2024
1 parent 332b3d4 commit 19abff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lesspipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ has_colorizer () {
[[ -z $style ]] && style=plain
[[ -z $theme ]] && theme=ansi
fi
[[ -n $style ]] && opt+=(--style="${style%% *}")
[[ -n $theme ]] && opt+=(--theme="${theme%%[|&;<>]*}")
style="${style%% *}" theme="${theme%%[|&;<>]*}"
opt+=(${style:+--style="$style"} ${theme:+--theme="$theme"})
opt+=("$COLOR" --paging=never "$1") ;;
pygmentize)
pygmentize -l "$lang" /dev/null &>/dev/null && opt=(-l "$lang") || opt=(-g)
Expand Down

0 comments on commit 19abff7

Please sign in to comment.