@wayowe/rehype-minify-whitespace

0.10.3 • Public • Published

@wayowe/rehype-minify-whitespace

Collapse whitespace.

Normally, collapses to a single space. If newlines: true, collapses white-space containing newlines to '\n' instead of ' '.

Installation

npm install --save @wayowe/rehype-minify-whitespace

Usage

In
<h1>Heading</h1>
···→ →···foo···→
<p><strong>This</strong> and <em>that</em></p>
Out
<h1>Heading</h1>
foo
<p><strong>This</strong> and <em>that</em></p>

Api

node.data.ignore

When this property is true the node is skipped for whitespace handling.

node.data.preserveWhitespace

When this property is true the node is skipped for whitespace handling.

Caveats

The implementation is a modified version of Rehype rehype-minify-whitespace 2.0.3

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.10.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.10.3
    0
  • 0.10.2
    0

Package Sidebar

Install

npm i @wayowe/rehype-minify-whitespace

Weekly Downloads

0

Version

0.10.3

License

ISC

Unpacked Size

6.59 kB

Total Files

5

Last publish

Collaborators

  • suiga