npm.io
1.0.18 • Published 2 years ago

typographic-semicolon

Licence
MIT
Version
1.0.18
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
236

typographic-semicolon Build Status Coverage Status

Micro module to fix a common typographic issue that is hard to fix with most keyboard layouts.

This is mainly meant for French typography, it replaces the space preceding a semicolon by a narrow no-break space (en, fr).

Submit a PR to src/db.js to add support for your locale.

Install

npm:

npm install --save typographic-semicolon

Usage

var semiColon = require('typographic-semicolon')

semiColon(`Exemple ; voici.`, { locale: 'fr' })
// this char      ^ will be replaced by a narrow no-break space

This module can also be used through textr.

License

MIT Zeste de Savoir

Keywords