@razroo/razroo-remark-embed-code
v2.0.1
Published
Razroo Remark plugin for embedding code snippets from github permalinks.
Downloads
88
Readme
remark-embedded-code-snippets
Remark plugin for embedding code snippets from github permalinks.
Usage
yarn add --dev @razroo/razroo-remark-embed-code
import remark from 'remark';
import embeddedCodeSnippets from '@razroo/razroo-remark-embed-code';
import report from 'vfile-reporter';
remark()
.use(embeddedCodeSnippets)
.process(markdown, (err, file) => {
console.log(String(file));
console.error(report(err || file));
});
Example
Input
![](https://github.com/jomaxx/remark-embedded-code-snippets/blob/78d8ec567422a9776beb2d48dd826189aed58267/prettier.config.js#L1)
Output
module.exports = require('@spotify/web-scripts/config/prettier.config.js');