htmlification
Convert plain/text
into html.
features
- convert line breaking character (
\r\n
) intobr
. - convert schema uri (
any://th.in/g
) into clickablea
tag. - convert schema less uri into clickable http
a
tag.
Installation
install via npm
npm install htmlification
examples
var toHTML = ; var str = 'Foo http://foo.example.com' + '\r\n' + 'Bar magnet://bar.example.com' + '\r\n' + 'Baz baz://baz.example.com' + '\r\n' + 'qux quz.example.com'; var result = ;console;
result would be
Foo http://foo.example.comBar magnet://bar.example.comBaz baz://baz.example.comquxquz.example.com
License
MIT