Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inkdropapp/remark-squeeze-links
remark plugin to remove empty (or white-space only) links
https://github.com/inkdropapp/remark-squeeze-links
markdown mdast remark
Last synced: 20 days ago
JSON representation
remark plugin to remove empty (or white-space only) links
- Host: GitHub
- URL: https://github.com/inkdropapp/remark-squeeze-links
- Owner: inkdropapp
- License: mit
- Created: 2021-04-01T03:13:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T00:09:35.000Z (almost 2 years ago)
- Last Synced: 2024-12-01T21:37:17.254Z (26 days ago)
- Topics: markdown, mdast, remark
- Language: JavaScript
- Homepage:
- Size: 188 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remark-squeeze-links
[**remark**][remark] plugin to remove empty (or whitespace only) links.
## Install
[npm][]:
```sh
npm install remark-squeeze-links
```## Use
```js
import { remark } from 'remark'
import { squeezeLinks } from 'remark-squeeze-links'remark().use(squeezeLinks).processSync('[](#about)\ntext').toString()
// => "text\n"
```## API
### `remark().use(squeezeLinks)`
Remove empty (or white-space only) links.
## Related
- [`mdast-squeeze-links`][mdast-squeeze-links]
— [**mdast**][mdast] utility that is in the core of this plugin## Contribute
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.## License
[MIT][license] © [Takuya Matsuyama][author]
[npm]: https://docs.npmjs.com/cli/install
[health]: https://github.com/remarkjs/.github
[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md
[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md
[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md
[license]: LICENSE
[author]: https://www.craftz.dog/
[remark]: https://github.com/remarkjs/remark
[mdast]: https://github.com/syntax-tree/mdast
[mdast-squeeze-links]: https://github.com/syntax-tree/mdast-squeeze-links
[hast]: https://github.com/syntax-tree/hast