1.1.0 • Published 4 years ago

remark-sources v1.1.0

Weekly downloads
78
License
MIT
Repository
github
Last release
4 years ago

remark-sources

Inject source code to markdown files.

Install

npm install --save-dev remark-sources

Usage

const remark = require('remark');
const sources = require('remark-sources');
const input = '```js (index.js)\n```'; // (path to file in round brackets)
const options = {};
const output = remark().use(sources, options).processSync(input).toString();

Output:

// this is index.js content

Options

const defaultOptions = {};