1.0.5 • Published 9 years ago

posthtml-textr v1.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

PostHTML-Textr

npm version

PostHTML plugin wrapper over Textr modular typographic framework

Usage

var posthtml = require('posthtml'),
    html = '<article class="my-article"><h1>Hello  "world"...\n</h1><p>foo...bar</p></article>';

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);
        //<article class="my-article"><h1>Hello «world»…</h1><p>foo…bar</p></article>
    })