1.0.1 • Published 8 years ago

wiki-linkify v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

wiki-linkify

Takes Wiki content like this:

Welcome to the SuperDuper wiki, where we categorize SuperDuper things.

and turns it into this:

Welcome to the <a href="/SuperDuper">SuperDuper</a> wiki, where we categorize <a href="/SuperDuper">SuperDuper</a> things.

Install

npm install wiki-linkify

Usage

var wikiLinkify = require('wiki-linkify');
var originalContent = "Welcome to the SuperDuper wiki, where we categorize SuperDuper things.";
var wikiContent = wikiLinkify(originalContent);
console.log(wikiContent);

The above example displays:

Welcome to the <a href="/SuperDuper">SuperDuper</a> wiki, where we categorize <a href="/SuperDuper">SuperDuper</a> things.