Compare commits

..

No commits in common. "1d09ac59967d06e2c070d6369a7003f8c72d4d70" and "31d15e641686b27e3b348eb95f1a10107076b68c" have entirely different histories.

2 changed files with 56 additions and 52 deletions

View file

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

View file

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