Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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