https://github.com/posthtml/posthtml-textr
Textr for PostHTML
https://github.com/posthtml/posthtml-textr
Last synced: 10 months ago
JSON representation
Textr for PostHTML
- Host: GitHub
- URL: https://github.com/posthtml/posthtml-textr
- Owner: posthtml
- Created: 2015-09-23T16:13:11.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-09T12:58:34.000Z (about 10 years ago)
- Last Synced: 2024-10-29T21:06:08.250Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://npmjs.com/package/posthtml-textr
- Size: 5.86 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostHTML-Textr
[](http://badge.fury.io/js/posthtml-textr)
[PostHTML](http://github.com/posthtml/posthtml) plugin wrapper over [Textr](http://a.github.io/textr) modular typographic framework
## Usage
```js
var posthtml = require('posthtml'),
html = '
Hello "world"...\n
foo...bar
';
posthtml()
.use(require('posthtml-textr')(
{ locale: 'ru'},
[
require('typographic-ellipses'),
require('typographic-single-spaces'),
require('typographic-quotes')
]
))
.process(html)
.then(function(result) {
console.log(result.html);
//
Hello «world»…
foo…bar
})
```