diff options
author | Case Duckworth | 2019-07-01 12:37:58 -0500 |
---|---|---|
committer | Case Duckworth | 2019-07-01 12:37:58 -0500 |
commit | 8e591b1b1180472a184876381af66f42328dee61 (patch) | |
tree | 5ef83a6e12c5ccd5dc5ca36f38d5b5d9ee4b2dee /lht | |
parent | Copyedit (diff) | |
download | unk-8e591b1b1180472a184876381af66f42328dee61.tar.gz unk-8e591b1b1180472a184876381af66f42328dee61.zip |
Change order to allow inline on ends of p
Diffstat (limited to 'lht')
-rwxr-xr-x | lht | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lht b/lht index 247acf9..5d46095 100755 --- a/lht +++ b/lht | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/usr/bin/awk -f | 1 | #!/usr/bin/awk -f |
2 | function s(t,i){while(match($0,t)){if(I[ni]==i)ni-=sub(t,"</"i">") | 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} | 3 | else if(sub(t,"<"i">"))I[++ni]=i}}BEGIN{FS="\n"; RS="";ni=0} |
4 | {s("[\\*_]{2}","strong");s("[\\*_]","em");s("`","code") | 4 | {$0=(match($0,/^<.*>$/))?$0:"<p>"$0"</p>" |
5 | $0=(match($0,/^<.*>$/))?$0:"<p>"$0"</p>";print} | 5 | s("__","strong");s("\\*","em");s("`","code"); print} |