Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-smartypants

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-smartypants

remark plugin to implement SmartyPants

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is remark-smartypants?

The remark-smartypants package is a plugin for the remark markdown processor that automatically converts ASCII punctuation characters into 'smart' typographic punctuation. This includes converting straight quotes to curly quotes, double hyphens to en dashes, triple hyphens to em dashes, and more.

What are remark-smartypants's main functionalities?

Curly Quotes

This feature converts straight double quotes to curly double quotes. In the example, the straight quotes around 'Hello, world!' are converted to curly quotes.

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

const markdown = '"Hello, world!"';
const result = remark().use(smartypants).processSync(markdown).toString();
console.log(result); // “Hello, world!”

En Dashes

This feature converts double hyphens to en dashes. In the example, '2010--2020' is converted to '2010–2020'.

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

const markdown = '2010--2020';
const result = remark().use(smartypants).processSync(markdown).toString();
console.log(result); // 2010–2020

Em Dashes

This feature converts triple hyphens to em dashes. In the example, 'Wait---what?' is converted to 'Wait—what?'.

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

const markdown = 'Wait---what?';
const result = remark().use(smartypants).processSync(markdown).toString();
console.log(result); // Wait—what?

Other packages similar to remark-smartypants

Keywords

FAQs

Package last updated on 08 Jul 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc