1.2.1 • Published 1 year ago
@0x6b/textlint-rule-normalize-whitespaces v1.2.1
textlint-rule-normalize-whitespaces
textlint rule which replaces following whitespaces to normal whitespace (U+0020) in your document.
| Code Point | Name |
|---|---|
U+00A0 | NO-BREAK SPACE |
U+1680 | OGHAM SPACE MARK |
U+2000 | EN QUAD |
U+2001 | EM QUAD |
U+2002 | EN SPACE |
U+2003 | EM SPACE |
U+2004 | THREE-PER-EM SPACE |
U+2005 | FOUR-PER-EM SPACE |
U+2006 | SIX-PER-EM SPACE |
U+2007 | FIGURE SPACE |
U+2008 | PUNCTUATION SPACE |
U+2009 | THIN SPACE |
U+200A | HAIR SPACE |
U+202F | NARROW NON-BREAKING SPACE |
U+205F | MEDIUM MATHEMATICAL SPACE |
U+3000 | IDEOGRAPHIC SPACE |
Install
Install with npm:
npm install @0x6b/textlint-rule-normalize-whitespacesThis module requires Node.js >= 16.0.0.
Usage
Via .textlintrc(recommended):
{
"rules": {
"@0x6b/normalize-whitespaces": true
}
}Via CLI:
textlint --rule @0x6b/normalize-whitespaces README.mdBuild
Builds source codes for publish to the lib/ folder.
You can write ES2015+ source codes in src/ folder.
npm install && npm run buildTest
Run test code in test folder by textlint-tester.
npm testReferences
- The Unicode (r) Standard Version 15.0 Core Specification, Chapter 6 Writing Systems and Punctuation, Table 6-2. Unicode Space Characters
- Unicode spaces
License
MIT © 0x6b