An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# PostHTML-Textr
[![npm version](https://badge.fury.io/js/posthtml-textr.svg)](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


})
```