Gathering detailed insights and metrics for remark-squeeze-paragraphs
Gathering detailed insights and metrics for remark-squeeze-paragraphs
Gathering detailed insights and metrics for remark-squeeze-paragraphs
Gathering detailed insights and metrics for remark-squeeze-paragraphs
plugin to remove empty (or white-space only) paragraphs
npm install remark-squeeze-paragraphs
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
10 Stars
90 Commits
1 Forks
8 Watching
1 Branches
14 Contributors
Updated on 13 Dec 2023
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.5%
244,509
Compared to previous day
Last week
0.8%
1,354,861
Compared to previous week
Last month
4.7%
5,970,360
Compared to previous month
Last year
-49.5%
87,880,074
Compared to previous year
remark plugin to remove empty (or white space only) paragraphs.
This package is a unified (remark) plugin that removes empty paragraphs, left over from other operations, from the tree. Paragraphs are considered empty if they do not contain non-whitespace characters.
This project is mostly useful when you’re using other plugins that remove things
from the AST (such as remark-strip-badges
).
You can then use this plugin afterwards to clean stray empty paragraphs.
👉 Note: this plugin used to be useful, but with time the responsibility for cleaning the tree has shifted to the plugins that cause that.
If you need this, you should also open an issue with the tools causing that.
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install remark-squeeze-paragraphs
In Deno with esm.sh
:
1import remarkSqueezeParagraphs from 'https://esm.sh/remark-squeeze-paragraphs@6'
In browsers with esm.sh
:
1<script type="module"> 2 import remarkSqueezeParagraphs from 'https://esm.sh/remark-squeeze-paragraphs@6?bundle' 3</script>
1import {remark} from 'remark' 2import remarkSqueezeParagraphs from 'remark-squeeze-paragraphs' 3import remarkStripBadges from 'remark-strip-badges' 4 5console.log( 6 String( 7 await remark() 8 .use(remarkStripBadges) 9 .process('![](https://img.shields.io/)\n\ntext') 10 ) 11) 12// => '\n\ntext\n' 13 14console.log( 15 String( 16 await remark() 17 .use(remarkStripBadges) 18 .use(remarkSqueezeParagraphs) 19 .process('![](https://img.shields.io/)\n\ntext') 20 ) 21) 22// => 'text\n'
This package exports no identifiers.
The default export is
remarkSqueezeParagraphs
.
unified().use(remarkSqueezeParagraphs)
Remove empty (or white space only) paragraphs.
There are no parameters.
Transform (Transformer
).
This package is fully typed with TypeScript. It exports no additional types.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
remark-squeeze-paragraphs@^6
, compatible with Node.js 16.
This plugin works with unified
version 3+ and remark
version 4+.
Use of remark-squeeze-paragraphs
does not involve rehype
(hast) or user content so there are no openings for cross-site
scripting (XSS) attacks.
mdast-squeeze-paragraphs
— mdast utility with similar functionalitySee contributing.md
in remarkjs/.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.
MIT © Eugene Sharygin
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More