npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ai-react-markdown/remark-mark-highlight

v1.0.0

Published

remark plugin for ==mark== highlight syntax — first-party successor to remark-mark-highlight, with dual ESM/CJS output.

Downloads

111

Readme

@ai-react-markdown/remark-mark-highlight

npm license

remark plugin for ==mark== highlight syntax: ==text== parses to an mdast mark node and renders as <mark>text</mark>.

First-party continuation of the unmaintained remark-mark-highlight, used internally by @ai-react-markdown/core's sealed highlight engine plugin — published standalone because it is useful outside this repo, and because the upstream's ESM-only exports map broke bare-Node CJS require() consumers.

Install

npm install @ai-react-markdown/remark-mark-highlight

Dual ESM/CJS build: both import and require work, types included for both.

Use

import { unified } from 'unified';
import remarkParse from 'remark-parse';
import { remarkMarkHighlight } from '@ai-react-markdown/remark-mark-highlight';

const processor = unified().use(remarkParse).use(remarkMarkHighlight);
// '==hi==' → mdast: { type: 'mark', data: { hName: 'mark' }, children: [...] }
// → hast/HTML: <mark>hi</mark> (via data.hName — no custom handler needed)

Serialization back to markdown (remark-stringify) is supported; == sequences round-trip.

Behavior contract

  • Attention-style tokenizer (same family as GFM strikethrough): exactly two =, standard flanking rules, nesting with emphasis/strong, escapes and code spans respected, spans may contain line endings. Interplay with other attention extensions (e.g. GFM strikethrough) follows micromark's shared attention machinery but is not part of the pinned corpus, which runs the plugin without GFM.
  • Byte-compatible with [email protected]: a 50-case parity corpus (mdast with positions + hast), generated against the upstream before this package replaced it, runs in CI. Behavior changes would be a semver-major of this package.

Footguns

  • Loading the plugin changes how remark-stringify escapes =. The serializer registers = as unsafe in phrasing content (so == spans survive round-trips), which escapes every phrasing =let a = b serializes as let a \= b. This matches the upstream's behavior and only affects stringify output, never parsing or rendering.

API

| Export | What | | ------------------------------------------------------- | -------------------------------------------------------------------------------------- | | remarkMarkHighlight | The remark plugin (also aliased as remarkMark, the upstream's export name) | | markHighlight() | The raw micromark extension | | markHighlightFromMarkdown / markHighlightToMarkdown | The mdast from/to-markdown extensions | | Mark (type) | The mdast node interface (type: 'mark'), registered in mdast's phrasing-content maps |

Versioning

This package versions independently of the @ai-react-markdown/core release train — core depends on it through a normal semver range.

License

MIT. Derived from the MIT-licensed remark-mark-highlight and micromark-extension-highlight-mark / mdast-util-highlight-mark; see LICENSE for attribution.