An open API service indexing awesome lists of open source software.

https://github.com/tylingsoft/markdown-it-regex

Plugin for markdown-it, replaces strings that match a regular expression pattern.
https://github.com/tylingsoft/markdown-it-regex

Last synced: about 1 year ago
JSON representation

Plugin for markdown-it, replaces strings that match a regular expression pattern.

Awesome Lists containing this project

README

          

# markdown-it-regex

Plugin for markdown-it, replaces strings that match a regular expression
pattern.

## Installation

```
yarn add markdown-it-regex
```

## Usage

```javascript
import markdownIt from "markdown-it";
import markdownItRegex from "markdown-it-regex";
const mdi = markdownIt();
mdi.use(markdownItRegex, {
name: "emoji",
regex: /(:(?:heart|panda_face|car):)/,
replace: (match) => {
return ``;
},
});
mdi.render("I :heart: you"); //

I you


```