$ gnpm install @starptech/rehype-minify-whitespace
Collapse whitespace.
Normally, collapses to a single space. If newlines: true
,
collapses white-space containing newlines to '\n'
instead
of ' '
.
npm install --save @starptech/rehype-minify-whitespace
<h1>Heading</h1>
···→ →···foo···→
<p><strong>This</strong> and <em>that</em></p>
<h1>Heading</h1>
foo
<p><strong>This</strong> and <em>that</em></p>
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.
The implementation is a modified version of Rehype rehype-minify-whitespace 2.0.3
Copyright 2013 - present © cnpmjs.org | Home |