Skip to content

Commit

Permalink
Merge pull request #7 from dineshsaini/main
Browse files Browse the repository at this point in the history
fixed header prettify code
  • Loading branch information
grayphi authored Nov 20, 2021
2 parents 6e9e543 + 5e7d36a commit 12e6e15
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 12e6e15

Please sign in to comment.