commonmark-linkify
v1.2.0
Published
Convert URLs to clickable links in commonmark
Downloads
9
Readme
Linkify for commonmark.js
This package offers an AST transformer for converting bare URLs to links in commonmark.
Usage
var commonmark = require("commonmark");
var linkifyTransform = require("commonmark-linkify");
var src = "foo http://example.com bar";
var reader = new commonmark.Parser();
var writer = new commonmark.HtmlRenderer();
var parsed = reader.parse(src);
var transformed = linkifyTransform(parsed);
var htmlSrc = writer.render(transformed);