0.1.1 • Published 11 months ago

vitepress-markdown-it-repl v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

itcatplayit/vitepress-markdown-it-repl

npm license

repl display for markdown-it plugin in vitepress project.

Install

npm i vitepress-markdown-it-repl

Usage

in your vitepress project's .vitepress/config.ts file:

import { defineConfig } from 'vitepress'
import { default as replPlugin } from 'vitepress-markdown-it-repl';

export default defineConfig({
  // ...
  markdown: {
    lineNumbers: true, // or false
    // set globalEnabledLineNumbers's value same as lineNumbers above.
    config: md => md.use(replPlugin, { globalEnabledLineNumbers: true })
  },
  // ...
})

then, in your markdown file, you can use as this:

npm.io

it will display repl symbol:

npm.io

default Options

optiondefault value
globalEnabledLineNumbersfalse
symbol'$'
leftDelimiter'$('
rightDelimiter')'

unusual code block

when you set a global symbol like '$', but some unusual code block, you want a symbol like '#', how?

```bash $(1#)
echo a b
```
0.1.1

11 months ago

0.1.0

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago