#!/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} {$0=(match($0,/^<.*>$/))?$0:"
"$0"