Turn stuff like
https://github.com/isaacs/npm/issues/1234, for your hyperlinking
The options can have a
format field (default =
'text') and a
project field (default =
var ghlink = ;var someString = 'hello world user/project#12 fixed by isaacs/node@deadbeef';var textOutput = ;console// hello world fixed by//var htmlOutput = ;console// hello world <a href="">user/project#12</a> fixed by// <a href="">isaacs/node@deadbeef</a>var links = ;// [user/project#12]:// [isaacs/node@deadbeef]:var md = ;// hello world [user/project#12]() fixed by// [isaacs/node@deadbeef]()var lexed = ;// lexed is now an array with some strings and some objects huzzah.var linkobj =// like lexed, but just the link objects, no strings
project field in the options object should be something like
user/project, and then stuff like
#223 are assumed to
be for that project.
Note that this module does not look up anything at any github API to verify that the references actually exist, or to provide titles or anything else. It's strictly a string munging utility.