Compare commits

...

2 commits

2 changed files with 52 additions and 56 deletions

View file

@ -1,14 +1,11 @@
---
skip_output: [meta, success]
no_tty: true
commit-msg:
commands:
lint:convco:
run: cat {1} | convco check --from-stdin
lint:typos:
run: cat {1} | typos -
pre-commit:
parallel: false
commands:
@ -19,8 +16,7 @@ pre-commit:
run: shellcheck {staged_files}
shfmt:
glob: "*.sh"
run: shfmt -d -ln bash -i 4 {staged_files}
run: shfmt -d -ln bash -i 2 {staged_files}
pre-push:
parallel: false
commands:

View file

@ -13,9 +13,9 @@ process_args() {
escape() {
local string
string=$1
string=${string//"&"/"&"}
string=${string//"<"/"&lt;"}
string=${string//">"/"&gt;"}
string=${string//"&"/"&amp;"}
printf "%s" "$string"
}
@ -46,7 +46,7 @@ main() {
if [[ ${#title} -gt 25 ]]; then
title="${title:0:24}"
fi
title="<b>$title</b>"
title="<b>$(escape "$title")</b>"
if [ -n "$artist" ]; then
if [[ ${#artist} -gt 22 ]]; then