BEGIN { in_code = 0 } /^ | / { if (!in_code) { print "
"; in_code = 1 }
sub(/^ | /, "", $0)
gsub(/&/, "\\&"); gsub(/, "\\<"); gsub(/>/, "\\>")
print; next
}
{ if (in_code) { print ""; in_code = 0 } print }
END { if (in_code) print "" }