improve centering on highlighted slides
Akshay nerdypepper@tuta.io
Mon, 03 Feb 2020 00:04:59 +0530
2 files changed,
7 insertions(+),
4 deletions(-)
M
example/1-hi.txt
→
example/1-hi.txt
@@ -1,8 +1,8 @@
HI THERE -Welcome to ${GRN}shlide${RST}. Here are a few bullet points: +Welcome to ${GRN}shlide${RST}. ${YLW}Here${RST} are a few bullet points: - first point - second point * sub point - * another sub point + * ${RED}another${RST} sub point
M
shlide
→
shlide
@@ -20,9 +20,12 @@ printf '%s\n' "${#lines[@]}"
} longest_line() { - max=0 IFS= + max=0 + local IFS= while read -r line; do - if [ "${#line}" -gt "$max" ]; then max="${#line}"; fi + l=$(ansi_filter $(colorify "$line")) + echo "$l" >> log.txt + if [ "${#l}" -gt "$max" ]; then max="${#l}"; fi done < "$1" printf '%s\n' "$max" }