0.1.0 • Published 1 year ago

remark-mark-highlight v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

remark-mark-highlight

Thanks to remark-gfm

A plugin that can transform ==text== into <span class="mark">text</span>.

I prefer to use this plugin in Astro to highlight the marked text.

Usage

This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install the plugin with npm/yarn/pnpm

npm i -D remark-mark-highlight

Import

import { remarkMark } from 'remark-mark-highlight'
// https://astro.build/config
export default defineConfig({
  // ...
  markdown: {
    remarkPlugins: [remarkMark],
    //              ^^^^^^^^^^
  },
})

Add css

.mark {
  background-color: rgba(255, 255, 0, 0.5);
}
0.1.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago