retext-smartypants
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -293,3 +293,3 @@ 'use strict'; | ||
/* Transform dumb single- and double quotes into smart | ||
/* Transform straight single- and double quotes into smart | ||
* quotes. */ | ||
@@ -296,0 +296,0 @@ function quotes(node, index, parent) { |
{ | ||
"name": "retext-smartypants", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Retext implementation of SmartyPants", | ||
@@ -26,8 +26,8 @@ "license": "MIT", | ||
"esmangle": "^1.0.1", | ||
"nyc": "^10.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-preset-wooorm": "^2.0.0", | ||
"nyc": "^11.0.0", | ||
"remark-cli": "^4.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
"retext": "^5.0.0", | ||
"tape": "^4.0.0", | ||
"xo": "^0.17.1" | ||
"xo": "^0.18.0" | ||
}, | ||
@@ -52,2 +52,3 @@ "scripts": { | ||
"space": true, | ||
"esnext": false, | ||
"ignores": [ | ||
@@ -58,4 +59,6 @@ "retext-smartypants.js" | ||
"remarkConfig": { | ||
"plugins": ["preset-wooorm"] | ||
"plugins": [ | ||
"preset-wooorm" | ||
] | ||
} | ||
} |
@@ -36,27 +36,45 @@ # retext-smartypants [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
Replaces “dumb” punctuation marks with “smart” punctuation marks. | ||
Replaces dumb/straight/typewriter punctuation marks with smart punctuation | ||
marks. | ||
###### `options` | ||
##### `options` | ||
* `quotes` (`boolean`, default: `true`) | ||
— Converts “dumb” double and single quotes to smart double or | ||
single quotes; | ||
* `ellipses` (`boolean`, default: `true`) | ||
— Converts triple dot characters (with or without spaces between) | ||
into a single unicode ellipsis character; | ||
* `backticks` (`boolean` or `'all'`, default: `true`) | ||
— When `true`, converts double back-ticks into an opening double | ||
quote, and double “dumb” single quotes into a closing double quote; | ||
When `'all'`: does the preceding, and converts single back-ticks | ||
into an opening single quote, and a “dumb” single quote into a | ||
closing single quote. | ||
###### `options.quotes` | ||
**Note!** Quotes can not be `true` when `backticks` is `'all'`; | ||
Create smart quotes (`boolean`, default: `true`). | ||
* `dashes` (`boolean` or `'oldschool'`, `'inverted'`, default: `true`) | ||
— When `true`, converts two dashes into an em-dash character; | ||
When `'oldschool'`, converts two dashes into an en-dash, and three | ||
dashes into an em-dash; When `'inverted'`, converts two dashes into | ||
an em-dash, and three dashes into an en-dash. | ||
Converts straight double and single quotes to smart double or single quotes. | ||
###### `options.ellipses` | ||
Create smart ellipses (`boolean`, default: `true`). | ||
Converts triple dot characters (with or without spaces between) into a single | ||
unicode ellipsis character | ||
###### `options.backticks` | ||
Create smart quotes from backticks (`boolean` or `'all'`, default: `true`). | ||
When `true`, converts double back-ticks into an opening double quote, and | ||
double straight single quotes into a closing double quote. | ||
When `'all'`: does the preceding and converts single back-ticks into an | ||
opening single quote, and a straight single quote into a closing single | ||
smart quote. | ||
> **Note**: Quotes can not be `true` when `backticks` is `'all'`; | ||
###### `options.dashes` | ||
Create smart dashes (`boolean` or `'oldschool'`, `'inverted'`, default: `true`). | ||
When `true`, converts two dashes into an em-dash character. | ||
When `'oldschool'`, converts two dashes into an en-dash, and three dashes into | ||
an em-dash. | ||
When `'inverted'`, converts two dashes into an em-dash, and three dashes into | ||
an en-dash. | ||
## License | ||
@@ -63,0 +81,0 @@ |
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
13508
102
0