retext-smartypants
Advanced tools
Comparing version 3.0.2 to 3.0.3
11
index.js
'use strict' | ||
/* eslint-disable complexity */ | ||
var visit = require('unist-util-visit') | ||
@@ -22,3 +20,3 @@ var nlcstToString = require('nlcst-to-string') | ||
var enDash = '–' | ||
var ellipsis = '\u2026' | ||
var ellipsis = '…' | ||
var twoBackticks = '``' | ||
@@ -28,3 +26,3 @@ var backtick = '`' | ||
var singleQuote = "'" | ||
var apostrophe = '\u2019' | ||
var apostrophe = '’' | ||
var doubleQuote = '"' | ||
@@ -183,4 +181,4 @@ var openingDoubleQuote = '“' | ||
// Transformer. | ||
function transformer(cst) { | ||
visit(cst, visitor) | ||
function transformer(tree) { | ||
visit(tree, visitor) | ||
} | ||
@@ -309,2 +307,3 @@ | ||
// Transform straight single- and double quotes into smart quotes. | ||
// eslint-disable-next-line complexity | ||
function quotes(node, index, parent) { | ||
@@ -311,0 +310,0 @@ var siblings = parent.children |
{ | ||
"name": "retext-smartypants", | ||
"version": "3.0.2", | ||
"description": "Retext implementation of SmartyPants", | ||
"version": "3.0.3", | ||
"description": "retext plugin to implement SmartyPants", | ||
"license": "MIT", | ||
"keywords": [ | ||
"unified", | ||
"retext", | ||
@@ -25,10 +26,10 @@ "smartypants" | ||
"browserify": "^16.0.0", | ||
"nyc": "^13.0.0", | ||
"prettier": "^1.14.3", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.0.0", | ||
"remark-cli": "^6.0.0", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"retext": "^5.0.0", | ||
"remark-preset-wooorm": "^5.0.0", | ||
"retext": "^6.0.0", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.4.3", | ||
"xo": "^0.23.0" | ||
"tinyify": "^2.0.0", | ||
"xo": "^0.24.0" | ||
}, | ||
@@ -35,0 +36,0 @@ "scripts": { |
@@ -1,16 +0,24 @@ | ||
# retext-smartypants [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
# retext-smartypants | ||
[smartypants][] in [**retext**][retext]. | ||
[![Build][build-badge]][build] | ||
[![Coverage][coverage-badge]][coverage] | ||
[![Downloads][downloads-badge]][downloads] | ||
[![Size][size-badge]][size] | ||
[![Sponsors][sponsors-badge]][collective] | ||
[![Backers][backers-badge]][collective] | ||
[![Chat][chat-badge]][chat] | ||
## Installation | ||
[**retext**][retext] plugin to implement [SmartyPants][]. | ||
## Install | ||
[npm][]: | ||
```bash | ||
```sh | ||
npm install retext-smartypants | ||
``` | ||
## Usage | ||
## Use | ||
```javascript | ||
```js | ||
var retext = require('retext') | ||
@@ -28,3 +36,3 @@ var smartypants = require('retext-smartypants') | ||
```text | ||
```txt | ||
He said, “A ‘simple’ english sentence…” | ||
@@ -37,3 +45,3 @@ ``` | ||
Replaces dumb/straight/typewriter punctuation marks with smart punctuation | ||
Replaces dumb/straight/typewriter punctuation marks with smart/curly punctuation | ||
marks. | ||
@@ -83,7 +91,9 @@ | ||
See [`contributing.md` in `retextjs/retext`][contribute] for ways to get | ||
started. | ||
See [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways | ||
to get started. | ||
See [`support.md`][support] for ways to get help. | ||
This organisation has a [Code of Conduct][coc]. By interacting with this | ||
repository, organisation, or community you agree to abide by its terms. | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
abide by its terms. | ||
@@ -96,12 +106,38 @@ ## License | ||
[travis-badge]: https://img.shields.io/travis/retextjs/retext-smartypants.svg | ||
[build-badge]: https://img.shields.io/travis/retextjs/retext-smartypants.svg | ||
[travis]: https://travis-ci.org/retextjs/retext-smartypants | ||
[build]: https://travis-ci.org/retextjs/retext-smartypants | ||
[codecov-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-smartypants.svg | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-smartypants.svg | ||
[codecov]: https://codecov.io/github/retextjs/retext-smartypants | ||
[coverage]: https://codecov.io/github/retextjs/retext-smartypants | ||
[downloads-badge]: https://img.shields.io/npm/dm/retext-smartypants.svg | ||
[downloads]: https://www.npmjs.com/package/retext-smartypants | ||
[size-badge]: https://img.shields.io/bundlephobia/minzip/retext-smartypants.svg | ||
[size]: https://bundlephobia.com/result?p=retext-smartypants | ||
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg | ||
[backers-badge]: https://opencollective.com/unified/backers/badge.svg | ||
[collective]: https://opencollective.com/unified | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat]: https://spectrum.chat/unified/retext | ||
[npm]: https://docs.npmjs.com/cli/install | ||
[health]: https://github.com/retextjs/.github | ||
[contributing]: https://github.com/retextjs/.github/blob/master/contributing.md | ||
[support]: https://github.com/retextjs/.github/blob/master/support.md | ||
[coc]: https://github.com/retextjs/.github/blob/master/code-of-conduct.md | ||
[license]: license | ||
@@ -113,6 +149,2 @@ | ||
[smartypants]: http://daringfireball.net/projects/smartypants | ||
[contribute]: https://github.com/retextjs/retext/blob/master/contributing.md | ||
[coc]: https://github.com/retextjs/retext/blob/master/code-of-conduct.md | ||
[smartypants]: https://daringfireball.net/projects/smartypants |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14819
146
0