# vitepress-markdown-it-repl

> repl display for markdown-it plugin in vitepress project.

Latest version **0.1.1** (published 2023-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install vitepress-markdown-it-repl
pnpm add vitepress-markdown-it-repl
yarn add vitepress-markdown-it-repl
bun add vitepress-markdown-it-repl
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-06-05 |
| First published | 2023-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | itcatplayit |
| Maintainers | itcatplayit |
| Keywords | markdown-it, markdown-it-plugin, vue, vitepress, repl |

## Links

- npm: https://www.npmjs.com/package/vitepress-markdown-it-repl
- Repository: https://github.com/itcatplayit/vitepress-markdown-it-repl
- Issues: https://github.com/itcatplayit/vitepress-markdown-it-repl/issues
- npm.io page: https://npm.io/package/vitepress-markdown-it-repl

## Dependencies (2)

- [markdown-it](https://npm.io/package/markdown-it.md) ^13.0.1
- [@types/markdown-it](https://npm.io/package/@types/markdown-it.md) ^12.2.3

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2023-06-05
- 0.1.0 — 2023-05-27
- 0.0.2 — 2023-05-25
- 0.0.1 — 2023-05-25

## README

# itcatplayit/vitepress-markdown-it-repl

[![npm](https://badgen.net/npm/v/vitepress-markdown-it-repl)](https://www.npmjs.com/package/vitepress-markdown-it-repl)
[![license](https://badgen.net/github/license/itcatplayit/vitepress-markdown-it-repl)](https://github.com/itcatplayit/vitepress-markdown-it-repl/blob/main/LICENSE)

repl display for [markdown-it](https://github.com/itcatplayit/vitepress-markdown-it-repl) plugin in vitepress project.

## Install

```sh
npm i vitepress-markdown-it-repl
```

## Usage

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

```ts
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:

![](./assets/code.png)

it will display repl symbol:

![](./assets/display.png)

## default Options

| option                   | default value |
| -----                    | ------        |
| globalEnabledLineNumbers | false         |
| 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
    ```

---
_Source: https://npm.io/package/vitepress-markdown-it-repl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
