1.0.1 • Published 1 year ago

unified-plugin-highlight v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

unified plugin highlight

highlight

  • According pos dis1, dis2 to find documentation hight text.
const pos = [300, 600];

const processor = ({ pos }: { pos: number[] }) =>
  unified()
    //  markdown string to ast tree
    .use(parse)
    // add plugin to deal ast tree
    .use(myPlugin, { pos })
    //  ast tree transform markdown string
    .use(remarkStringify);