Change order to allow inline on ends of p
This commit is contained in:
parent
d29f07145a
commit
8e591b1b11
4
lht
4
lht
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/awk -f
|
||||
function s(t,i){while(match($0,t)){if(I[ni]==i)ni-=sub(t,"</"i">")
|
||||
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:"<p>"$0"</p>";print}
|
||||
{$0=(match($0,/^<.*>$/))?$0:"<p>"$0"</p>"
|
||||
s("__","strong");s("\\*","em");s("`","code"); print}
|
||||
|
|
Loading…
Reference in New Issue
Block a user