rehype-minify-language
rehype plugin to minify language attributes
Last updated a month ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rehype-minify-language 
SYNC missed versions from official npm registry.

rehype-minify-language

Build Coverage Downloads Size Sponsors Backers Chat

Minify language attributes.

Install

npm:

npm install rehype-minify-language

Use

On the API:

 unified()
   .use(require('rehype-parse'))
+  .use(require('rehype-minify-language'))
   .use(require('rehype-stringify'))
   .process('<span>some html</span>', function (err, file) {
     console.error(report(err || file))
     console.log(String(file))
   })

On the CLI:

rehype input.html --use minify-language > output.html

Example

In
<span lang="en-US">Color</span>
<a href="https://nl.wikipedia.org/wiki/HyperText_Markup_Language" hreflang="nld-NL">HTML</a>
<span xml:lang="pt-BR">ótimo</span>
<track src="colour.vtt" srclang="en-GB" label="English (UK)">
Out
<span lang="en">Color</span>
<a href="https://nl.wikipedia.org/wiki/HyperText_Markup_Language" hreflang="nl">HTML</a>
<span xml:lang="pt">ótimo</span>
<track src="colour.vtt" srclang="en-gb" label="English (UK)">

Contribute

See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Current Tags

  • 1.0.0                                ...           latest (a month ago)

1 Versions

  • 1.0.0                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 15
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |