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

@riebeckite/plugin-hard-breaks

v0.0.35

Published

Render ordinary Markdown line breaks as <br> elements for Riebeckite.

Readme

@riebeckite/plugin-hard-breaks

Render ordinary Markdown line breaks as <br> elements, matching Obsidian's behavior when "Strict line breaks" is turned off.

日本語

Overview

In standard Markdown, a single newline inside a paragraph is a soft break: it is rendered as a space. hardBreaks() registers the remark-breaks transformer on the Riebeckite Markdown pipeline so every soft break becomes a <br> element at build time.

The conversion happens on the Markdown AST before the tree is converted to HTML, so code blocks, inline code, and explicit hard breaks keep their meaning. The plugin adds no client JavaScript and no CSS.

Installation

import { defineConfig } from "@riebeckite/core";
import { hardBreaks } from "@riebeckite/plugin-hard-breaks";

export default defineConfig({
  // ...
  plugins: [hardBreaks()],
});

Add hardBreaks() to the plugins array of riebeckite.config.ts. The plugin is opt-in: without this entry, the pipeline keeps the standard Markdown soft break behavior.

Usage

import { hardBreaks } from "@riebeckite/plugin-hard-breaks";

hardBreaks();

The factory takes no options.

Before and after

Input:

今日はいい天気です。
散歩に行きました。
明日も晴れるといいな。

Without the plugin (standard Markdown), the three lines render on one line. With hardBreaks():

<p>今日はいい天気です。<br>
散歩に行きました。<br>
明日も晴れるといいな。</p>

Live example

hardBreaks() is opt-in, so this site keeps the standard Markdown behavior: the three lines below render as one paragraph.

First line Second line Third line

With the plugin enabled, each line ends with <br> instead.

Behavior

| Input | Result | | --- | --- | | A single newline inside a paragraph | Becomes a <br> | | A blank line between paragraphs | Still splits paragraphs | | A fenced code block | Unchanged | | Inline code | Unchanged | | Headings | Keep their Markdown heading structure | | Line breaks in list items | Handled by the Markdown AST structure | | Line breaks in blockquotes | Treated like ordinary paragraphs | | An explicit hard break (two trailing spaces or \) | Not converted twice | | Raw HTML in Markdown | Left as-is |

Limitations

  • The plugin converts soft breaks only. It does not change how blank lines, lists, or code blocks are parsed.
  • The result is decided at build time; rebuild the site after changing the plugin list.

Obsidian relationship

Obsidian has a setting called "Strict line breaks". When it is off, a single newline is shown as a line break. This plugin brings that same behavior to Riebeckite's rendered pages.

Exports

  • hardBreaks() — plugin factory
  • hardBreaks — alias of hardBreaks

See also