remark-codeset

Adds syntax to parse sets of code blocks in markdown. Transforms them to tablist.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
remark-codeset
371.1.44 years ago5 years agoMinified + gzip package size for remark-codeset in KB

Readme

remark-codeset
Adds syntax to parse sets of code blocks in markdown. Transforms them to tablist.

Install

npm install --save remark-codeset

How to use

import unified from 'unified';
import markdown from 'remark-parse';
import codeset from 'remark-codeset';
import remark2rehype from 'remark-rehype';
import html from 'rehype-stringify';

const processor = unified()
    .use(markdown)
    .use(codeset)
    .use(remark2rehype)
    .use(html);

const conent = `...`;

processor.process(content, (err, file) => {
    if (err) throw err;
    console.log(String(file));
});