$body =~ s/(\]?)(\n+)/$1?$1.$2:"
"/ges;