Socket
Book a DemoInstallSign in
Socket

remark-breaks

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-breaks

remark plugin to add break support, without needing spaces

latest
Source
npmnpm
Version
4.0.0
Version published
Maintainers
2
Created

What is remark-breaks?

The remark-breaks package is a plugin for the remark markdown processor that automatically converts hard line breaks in markdown text into HTML `<br>` tags. This can be particularly useful for ensuring that line breaks in markdown are preserved in the rendered HTML output.

What are remark-breaks's main functionalities?

Automatic Line Break Conversion

This feature allows you to automatically convert hard line breaks in markdown text into HTML `<br>` tags. In the example, the markdown text 'Hello\nWorld' will be converted to 'Hello<br>World' in the HTML output.

const remark = require('remark');
const breaks = require('remark-breaks');

const markdown = 'Hello\nWorld';

remark()
  .use(breaks)
  .process(markdown, function (err, file) {
    if (err) throw err;
    console.log(String(file));
  });

Other packages similar to remark-breaks

Keywords

break

FAQs

Package last updated on 22 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts