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.

  • 3.0.2
  • Source
  • npm
  • Socket score

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

remark-textr Build Status Coverage Status Chat

Make your typography better with remark and Textr (skipping code).

Installation

npm:

npm install remark-textr

Usage

Say we have the following file, example.md:

## spread operator...

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

And our script, example.js, looks as follows:

var vfile = require('to-vfile')
var remark = require('remark')
var textr = require('remark-textr')

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

remark()
  .use(textr, {plugins: [ellipses]})
  .process(vfile.readSync('example.md'), function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Yields:

## spread operator…

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

API

remark.use(textr[, config])

config.plugins

List of Textr plugins (Array.<string|Function>?). They are available on npm, labelled with textr keyword. Also you can easily create new one, as shown in the example above. If strings are passed in, those are required.

config.options

Passed to Textr as it’s options (Object?). For example, you may want to set your ISO 639 locale code. It’s important for stuff like the correct primary and secondary quotes.

Contribute

See contributing.md in remarkjs/remark for ways to get started.

This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Denys Dovhan

Keywords

FAQs

Package last updated on 13 Aug 2018

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