Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: brian (git@myr.sh)
Date: Wed Dec 27 11:49:34 2023 -0300
Parent: 4f61088
Updated shelldown
diff --git a/aux.sh b/aux.sh
index 38e3a0f..985d12a 100755
--- a/aux.sh
+++ b/aux.sh
@@ -114,9 +114,21 @@ type() {
*'`') printf "%s</kbd>" "${w%\`}" ;;
# images
+ '')
+ alt="${w#![}"
+ ref="${w#*(}"
+ printf '<img src="%s" alt="%s">' "${ref%)}" "${alt%]*}"
+ ;;
'')
+ alt="${w#[}"
+ ref="${w#*(}"
+ printf '<a href="%s">%s</a>' "${ref%)}" "${alt%]*}"
+ ;;
'['*) link="1" && alt="${w#[}" ;;
+
*) printf "$w" ;;
esac
printf " "