#!/bin/lua function conv(s) s = string.gsub(s,"&","&") s = string.gsub(s,"<","<") s = string.gsub(s,">",">") s = string.gsub(s," "," ") s = string.gsub(s,"\n","
\n") print("

"..s.."

\n") end if #arg ~= 0 then io.input(arg[1]) end p = "" for line in io.lines() do line = string.gsub(line," +$","") if #line > 0 then if #p > 0 then p = p.."\n"..line else p = line end elseif #p > 0 then conv(p) p = "" end end if #p > 0 then conv(p) end