0.3.3 • Published 7 months ago

markdown-it-marked v0.3.3

Weekly downloads
27
License
Apache-2.0
Repository
github
Last release
7 months ago

markdown-it-marked

On NPM CI status UMD size

Plugin for markdown-it for marking substrings within text.

Supports insertion of <mark/> elements to show render-time configured matches such as search text results or other context not in the markdown input string.

For having <mark/> with markdown syntax see markdown-it-mark plugin instead.

Install

npm install --save markdown-it-marked

Use

import MarkdownIt from 'markdown-it';
import {envFromTerms, plugin as markedPlugin} from 'markdown-it-marked';

const md = MarkdownIt().use(markedPlugin);

const html = md.render('some text to _render_', envFromTerms(['text']));
// html === '<p>some <mark>text</mark> to <i>render</i></p>\n'

TODO

  • Add instructions for transpiling with application settings.
  • Fancy unicode handling for \b replacement.
  • Attribute setting from match via replacement override.
0.3.2

7 months ago

0.3.1

7 months ago

0.3.3

7 months ago

0.3.0

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago