list

scripts

Repo containing scripts to be used with dovel, and git hooks that powers our web interface.

curl -O https://dovel.email/scripts.tar.gz tar.gz

9c2981e

Author: brian (git@myr.sh)

Date: Wed Dec 27 11:49:34 2023 -0300

Parent: 4f61088

Updated shelldown

Diff

aux.sh

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%]*}"
+			;;
                 '!['*) img="1" && alt="${w#![}" ;;
+
                 # links
+		'['*']('*')') 
+			alt="${w#[}"
+			ref="${w#*(}"
+			printf '<a href="%s">%s</a>' "${ref%)}" "${alt%]*}"
+			;;
                 '['*) link="1" && alt="${w#[}" ;;
+
 		*) printf "$w" ;;
 		esac
 		printf " "