Skip to content

widcardw/remark-mark-highlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published