remark-embedded-code-snippets
v2.0.2
Published
Remark plugin for embedding code snippets from github permalinks.
Downloads
4
Readme
remark-embedded-code-snippets
Remark plugin for embedding code snippets from github permalinks.
Usage
yarn add --dev remark-embedded-code-snippets
import remark from 'remark';
import embeddedCodeSnippets from 'remark-embedded-code-snippets';
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');