remark-scm-commit-links
v1.0.4
Published
Adds internal links to commit mentions
Downloads
4
Readme
remark-scm-commit-links
This plugins is used in SCM-Manager to find ChangesetShortLinks in text nodes and append the internal links.
Install
npm:
npm install remark-scm-commit-links
Use
Say we have the following Markdown file, example.md
:
Change API Signatures since we updated the API here:
eheimbuch/remark-scm-commit-links@ac584a6
And our script, example.js
, looks as follows:
const vfile = require("to-vfile");
const report = require("vfile-reporter");
const unified = require("unified");
const markdown = require("remark-parse");
const transformer = require("remark-scm-commit-links");
const html = require("remark-html");
unified()
.use(markdown)
.use(transformer)
.use(html)
.process(vfile.readSync("example.md"), (err, file) => {
console.error(report(err || file));
console.log(String(file));
});
The result will look like this:
Change API Signatures since we updated the API here:
[eheimbuch/remark-scm-commit-links@ac584a68w](/repo/eheimbuch/remark-scm-commit-links/code/changeset/ac584a6)