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

@comfit/markdown-it

v0.1.2

Published

Comfit plugin for highlighting fenced code blocks with markdown-it

Readme

@comfit/markdown-it

Comfit plugin for highlighting fenced code blocks with markdown-it, backed by @comfit/node.

npm License: MIT

Documentation · npm

Installation

Requires Node.js 22 or later and markdown-it 14 or 15.

npm install @comfit/markdown-it markdown-it

Usage

import markdownItComfit from "@comfit/markdown-it";
import MarkdownIt from "markdown-it";

const md = new MarkdownIt().use(markdownItComfit, {
  theme: "catppuccin-mocha",
});

console.log(md.render("```rust\nfn main() {}\n```\n"));

The plugin renders inline theme colors when theme or themes is supplied. Without a theme, it emits capture classes for a caller-provided stylesheet. See the HTML and CSS guide for stylesheets and layout.

Options

| Option | Default | Purpose | | ------------------ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | theme | None | Bundled theme ID for a single palette. | | themes | None | Named bundled theme IDs, such as { light: "catppina-light", dark: "catppina-dark" }. Requires inline output and cannot be combined with theme. | | defaultTheme | First name in themes | Select the initial named theme. | | style | "inline" with a theme, otherwise "class" | Emit inline colors, capture classes, or CSS variables with "variables". | | defaultLanguage | None | Language for unlabelled fences. | | aliases | None | Additional language aliases, resolved before built-in IDs and aliases. | | unknownLanguage | "skip" | Use the previous fence renderer for unknown languages, or throw with "error". | | rainbow | true | Collect bracket nesting depths. | | rainbowColors | 0 | Wrap bracket classes to a fixed palette size. Zero preserves depth unless a theme palette applies. | | classPrefix | "" | Prefix generated token, rainbow, and line classes. | | preClass | None | Add a class to the outer pre element. | | highlightedLines | [] | Emphasize one-based source lines in every fence. |

Language classes respect markdown-it's langPrefix setting. Token attributes from earlier plugins are preserved without modifying the tokens.

Inline code, indented code blocks, and unlabelled fences without defaultLanguage use markdown-it's existing rendering. Fence metadata after the language name is ignored. The plugin does not sanitize other Markdown output.

License

MIT. Native parser and query attribution is distributed with @comfit/node.