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

remark-textr

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-textr

Remark plugin for Textr — modular tool to make your typography better.

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26K
increased by3.99%
Maintainers
1
Weekly downloads
 
Created
Source

remark-textr

NPM version Build Status Coveralls Status Dependency Status

Remark plugin for Textr — modular tool to make your typography better.

Process your markdown with Textr plugins, skipping code.

Install

npm install --save remark-textr

Usage

import remark from 'remark';
import remarkTextr from 'remark-textr';

// textr plugin — just function to replace triple dots to ellipses
const ellipses = input => input.replace(/\.{3}/gim, '…');

const text = `
## spread operator...

    function(...args) { return args; }
`.trim();

remark.use(remarkTextr, { plugins: [ ellipses ] }).process(text);/*
## spread operator…

    function(...args) { return args; } */

API

remark.use(remarkTextr[, remarkOptions])

remarkOptions

Type: Object
Default: {}

Contain plugins and options which are Textr’s options. Check out Textr usage section.

remarkOptions.plugins

Type: Array
Default: []

Array of Textr plugins. They are available on npm, labelled with textr keyword. Also you can easily create new one. Don’t be scared.

remarkOptions.options

Type: Object
Default: {}

Any option was set in options will be passed into Textr as it's options.

For example, you may want to set your ISO 639 locale code. It's important for right correction, basically for proper primary and secondary quotes.

CLI

remark-textr as remark plugin has no CLI itself, so you are gonna use remark CLI instead. So check the remark-cli docs first. remark and remark-textr both have to be installed. Also you have to define textr plugins as Array of Strings, but you are lucky and remark-textr will require them for you!

inline

remark --use "textr=plugins:['typographic-base']" README.md --output README.md

config

remark README.md --output README.md

With this .remarkrc config defined:

{
  "plugins": {
    "textr": {
      "plugins": [ "typographic-base"],
      "options": { "locale": "en-us" }
    }
  }
}

License

MIT © Denys Dovhan

Keywords

FAQs

Package last updated on 10 Feb 2016

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