Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ralphtheninja/parse-markdown-links
Get all links from a markdown string.
https://github.com/ralphtheninja/parse-markdown-links
links markdown parse
Last synced: 25 days ago
JSON representation
Get all links from a markdown string.
- Host: GitHub
- URL: https://github.com/ralphtheninja/parse-markdown-links
- Owner: ralphtheninja
- Created: 2018-01-18T00:19:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T11:34:29.000Z (over 4 years ago)
- Last Synced: 2024-12-27T17:39:47.974Z (29 days ago)
- Topics: links, markdown, parse
- Language: JavaScript
- Size: 27.3 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- project-awesome - ralphtheninja/parse-markdown-links - Get all links from a markdown string. (JavaScript)
README
# parse-markdown-links
> Get all links from a markdown string.
[![npm](https://img.shields.io/npm/v/parse-markdown-links.svg)](https://www.npmjs.com/package/parse-markdown-links)
![Node version](https://img.shields.io/node/v/parse-markdown-links.svg)
[![Build Status](https://travis-ci.org/ralphtheninja/parse-markdown-links.svg?branch=master)](https://travis-ci.org/ralphtheninja/parse-markdown-links)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)Piggy backs on top of [`remarkable`](https://github.com/jonschlinkert/remarkable) to get a list of parsed tokens corresponding to links.
## Install
```
$ npm i parse-markdown-links -S
```## Usage
```js
const parse = require('parse-markdown-links')
console.log(parse('[a link](https://woohoo.com)\n![image](image.png)'))
// [ 'https://woohoo.com' , 'image.png' ]
```## API
### `parse(text)`
Takes a markdown string and returns an array of links.
## License
MIT