remark-mark-highlight
v0.1.1
Published
> Thanks to [`remark-gfm`](https://github.com/remarkjs/remark-gfm)
Downloads
3,533
Readme
remark-mark-highlight
Thanks to
remark-gfm
A plugin that can transform ==text==
into <mark>text</mark>
.
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);
}