Compare commits
2 commits
31d15e6416
...
1d09ac5996
Author | SHA1 | Date | |
---|---|---|---|
1d09ac5996 | |||
63581953db |
2 changed files with 52 additions and 56 deletions
|
@ -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:
|
||||
|
|
|
@ -13,9 +13,9 @@ process_args() {
|
|||
escape() {
|
||||
local string
|
||||
string=$1
|
||||
string=${string//"&"/"&"}
|
||||
string=${string//"<"/"<"}
|
||||
string=${string//">"/">"}
|
||||
string=${string//"&"/"&"}
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue