0.1.1 • Published 2 years ago
remark-code-block v0.1.1
Remark code block
- syntax highlighting with refractor which uses PrismJS under the hood.
support
filename
throughmeta
fieldsupport line highlighting through
meta
field
Use
import {remark} from 'remark';
import {remarkCodeBlock} from 'remark-code-block';
import js from 'refractor/lang/javascript.js';
// register any languages you want to apply syntax highlighting first
remarkCodeBlock.register(js);
remark().use(remarkCodeBlock);
Options
Option | Type | Default | Description |
---|---|---|---|
enableLineNumbers | boolean | true | Attach line numbers to span elements so you can show them through CSS |