From 0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 30 Jun 2019 12:50:07 -0500 Subject: Initial commit with lht &shabby --- lht | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 lht (limited to 'lht') diff --git a/lht b/lht new file mode 100755 index 0000000..771fcad --- /dev/null +++ b/lht @@ -0,0 +1,5 @@ +#!/usr/bin/awk -f +function s(t,i){while(match($0,t)){if(I[ni]==i)ni-=sub(t,"") +else if(sub(t,"<"i">"))I[++ni]=i}}BEGIN{FS="\n"; RS="";ni=0} +{s("[\\*_]{2}","strong");s("[\\*_]","em");s("`","code") +$0=(match($0,/>$/))?$0:"

"$0"

";print} -- cgit 1.4.1-21-gabe81