diff options
author | Case Duckworth | 2019-06-30 12:50:07 -0500 |
---|---|---|
committer | Case Duckworth | 2019-06-30 12:50:07 -0500 |
commit | 0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b (patch) | |
tree | 2d14ea4d8903d9494d191d13d299c9e0e8639f22 /lht | |
download | unk-0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b.tar.gz unk-0cdf3e1d6d881e78bed6956c0c7ad286f4c6b79b.zip |
Initial commit with lht &shabby
Diffstat (limited to 'lht')
-rwxr-xr-x | lht | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lht b/lht new file mode 100755 index 0000000..771fcad --- /dev/null +++ b/lht | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/usr/bin/awk -f | ||
2 | function s(t,i){while(match($0,t)){if(I[ni]==i)ni-=sub(t,"</"i">") | ||
3 | else if(sub(t,"<"i">"))I[++ni]=i}}BEGIN{FS="\n"; RS="";ni=0} | ||
4 | {s("[\\*_]{2}","strong");s("[\\*_]","em");s("`","code") | ||
5 | $0=(match($0,/>$/))?$0:"<p>"$0"</p>";print} | ||