Skip to content

Commit

Permalink
fixed header prettify code
Browse files Browse the repository at this point in the history
  • Loading branch information
dineshsaini committed Nov 20, 2021
1 parent c9f4c44 commit 5e7d36a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions annote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
###############################################################################

__NAME__="annote"
__VERSION__="1.09"
__VERSION__="1.10"

# variables
c_red="$(tput setaf 196)"
Expand Down Expand Up @@ -724,6 +724,9 @@ function make_header {
fmt="$(echo "$fmt" | sed -e "s/<TITLE>/$ntitle/g" )"
fi
done
if [ "x$flag_no_pretty" != "xy" ]; then
fmt="$(on_black "$fmt")"
fi
echo -e "$fmt"
}

Expand Down Expand Up @@ -765,7 +768,7 @@ function _list_notes {
local nids="$1"
local c=0
local l=""
on_black "$(make_header)"
make_header
if [ -n "$nids" ]; then
for n in `echo "$nids" | tr ',' '\n'`; do
if [[ "x$flag_show_archived" = "x" ]] && $(is_archived "$n"); then
Expand Down Expand Up @@ -807,7 +810,10 @@ function build_header {
fmt="$fmt$arg$list_delim"
c="$(( ++c ))"
done
echo -e "$(on_black "$fmt")"
if [ "x$flag_no_pretty" != "xy" ]; then
fmt="$(on_black "$fmt")"
fi
echo -e "$fmt"
}

function build_row {
Expand Down

0 comments on commit 5e7d36a

Please sign in to comment.