From 8e591b1b1180472a184876381af66f42328dee61 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 1 Jul 2019 12:37:58 -0500 Subject: Change order to allow inline on ends of p --- lht | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lht b/lht index 247acf9..5d46095 100755 --- a/lht +++ b/lht @@ -1,5 +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} +{$0=(match($0,/^<.*>$/))?$0:"

"$0"

" +s("__","strong");s("\\*","em");s("`","code"); print} -- cgit 1.4.1-21-gabe81