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

remark-typopo

v1.0.0

Published

remark plugin to apply microtypography fixes using Typopo

Readme

remark-typopo

A remark plugin integrating Typopo to automatically fix frequent microtypographical errors in Markdown text.

What is this?

This package integrates Typopo, a microtypography correction library created by Braňo Šandala, into remark, a Markdown processor. Typopo corrects punctuation, whitespace, symbols, and other typographical details, ensuring professional-quality typography. Typopo supports multiple languages including English, German, Slovak, Czech, and Rusyn.

Why use remark-typopo instead of existing solutions?

While plugins like remark-smartypants provide basic typographical enhancements, Typopo offers more comprehensive language-specific fixes and robust handling of microtypography errors. For example:

| Input | SmartyPants Output | Typopo Output | | ----------------------------------- | --------------------------------------------------------------------- | ----------------------------------- | | Hello -- and goodbye. | Hello — and goodbye. (spacing not corrected) | Hello—and goodbye. | | (c) 2025 | (c) 2025 (symbol not converted) | © 2025 | | 'Twas the night before Christmas. | ‘Twas the night before Christmas. (incorrect usage of single-quote) | ’Twas the night before Christmas. |

Features

Typopo fixes:

  • Dashes and hyphens
  • Quotes (single, double, primes)
  • Ellipsis
  • Symbols (multiplication signs, section signs, copyright symbols, trademarks, etc.)
  • Whitespace issues (non-breaking spaces, extra spaces, empty lines)
  • Common punctuation errors
  • And much more…

Installation

[!NOTE]
This package is ESM only.

npm install remark-typopo

Usage

Typical usage with remark

import { unified } from 'unified';
import remarkParse from 'remark-parse';
import remarkTypopo from 'remark-typopo';
import remarkStringify from 'remark-stringify';

const markdown = '"Hello" --- world!';

const processed = await unified()
  .use(remarkParse)
  .use(remarkTypopo, { locale: 'en-us' })
  .use(remarkStringify)
  .process(markdown);

console.log(String(processed));
// => “Hello” — world!

Usage with Astro

In Astro projects, you may want to set smartypants to false in your astro.config.mjs or astro.config.mts to avoid potential conflicts.

// astro.config.mjs
import { defineConfig } from 'astro/config';
import remarkTypopo from 'remark-typopo';

export default defineConfig({
  markdown: {
    smartypants: false,  // Turn off built-in smartypants
    remarkPlugins: [
      [remarkTypopo, { locale: 'en-us' }],
    ],
  },
});

Options

The following options are available:

| Option | Type | Default | Description | | ------------------- | ------- | --------- | --------------------------------------------------------------------------------------- | | locale | string | 'en-us' | Language locale for Typopo corrections ('en-us', 'de-de', 'sk', 'cs', 'rue'). | | allowInCodeBlocks | boolean | false | Allow Typopo corrections inside fenced code blocks. | | allowInInlineCode | boolean | false | Allow Typopo corrections within inline code spans. |

Deprecated options (not compatible)

The following original Typopo options are incompatible with this remark integration and are thus deprecated:

  • removeLines
  • removeWhitespacesBeforeMarkdownList
  • keepMarkdownCodeBlocks

Attempting to use these will have no effect or produce unintended side effects.

License

MIT