highline
v1.0.0
Published
Transforms GitHub links in a Markdown document into code blocks.
Downloads
18
Readme
highline
Transforms GitHub links in a Markdown document into code blocks.
Installation
npm install highlineUsage
var highline = require('highline')
highline(input, options)
.then(function (ouput) { }, function (err) {})input String
The markdown string.
options Object
templateFunctionA function with the signature
function (data) {}where data has the shape:codeStringThe lines of source code.labelStringThe link text.urlStringThe link URL.
Should return the replacement text.
Example
Input:
[Source](https://github.com/your-username/your-project/blob/5d5f139799bf5ac91c99322634981ebba69aa7fa/path/to/your/file.js#L1)Output:
```js
var hello = 'world!'
```Tests
$ npm testLicense
See LICENSE.

