![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | src/ | 2 years ago | - | |
![]() | test/ | 2 years ago | - | |
![]() | README.md | 2 years ago | 619 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 1.7K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | webpack.config.js | 2 years ago | 862 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | yarn.lock | 2 years ago | 124K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
Plugin for markdown-it, replaces strings that match a regular expression pattern.
yarn add markdown-it-regex
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 `<i class="e1a-${match.slice(1, -1)}"></i>`
}
})
mdi.render('I :heart: you') // <p>I <i class="e1a-heart"></i> you</p>
yarn run build
yarn test