jbe/bsw@0: --[[--
jbe/bsw@0: text_with_br_tags = -- text with
tags
jbe/bsw@0: encode.html_newlines(
jbe/bsw@0: text_with_lf_control_characters -- text with LF control characters
jbe/bsw@0: )
jbe/bsw@0:
jbe/bsw@0: This function transforms LF control characters (\n) into
tags.
jbe/bsw@0:
jbe/bsw@0: --]]--
jbe/bsw@0:
jbe/bsw@0: function encode.html_newlines(text)
jbe/bsw@0: return (string.gsub(text, '\n', '
'))
jbe/bsw@0: end