Collect link references
Collates link references from all documents in the stream and flushes a paragraph with the link references at the end of the stream.
npm i mkref --save
For the command line interface install mkdoc globally (npm i -g mkdoc).
Create the stream and write a commonmark document:
var ref = require('mkref')
, ast = require('mkast');
ast.src('[example]: http://example.com')
.pipe(ref())
.pipe(ast.stringify({indent: 2}))
.pipe(process.stdout);Collate link references:
mkcat README.md | mkref | mkoutUsage: mkref [options]
Link reference collation.
Options
-h, --help Display help and exit
--version Print the version and exit
[email protected]
ref([opts][, cb])Gets the link reference collation stream.
Returns an output stream.
optsObject processing options.cbFunction callback function.
inputReadable input stream.outputWritable output stream.
MIT
Created by mkdoc on April 18, 2016