All Projects → tcort → markdown-link-extractor

tcort / markdown-link-extractor

Licence: ISC license
extracts links from markdown texts

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to markdown-link-extractor

link-check
checks whether a hyperlink is alive (`200 OK`) or dead.
Stars: ✭ 35 (+94.44%)
Mutual labels:  hyperlinks
DesktopAppLink
Creates hyperlinks to call desktop applications from
Stars: ✭ 15 (-16.67%)
Mutual labels:  hyperlinks
ListEx
List control with innate tool-tips, color, sorting, embedded hyperlinks, sub-item custom data, column hiding and lot more abilities.
Stars: ✭ 17 (-5.56%)
Mutual labels:  hyperlinks
KGrabber
Userscript for extracting links from kissanime.ru and similar sites.
Stars: ✭ 29 (+61.11%)
Mutual labels:  extract-links

markdown-link-extractor

Extracts links from markdown texts.

Installation

$ npm install --save markdown-link-extractor

API

markdownLinkExtractor(markdown)

Parameters:

  • markdown text in markdown format.

Returns:

  • an array containing the URLs from the links found.

Examples

const { readFileSync } = require('fs');
const markdownLinkExtractor = require('markdown-link-extractor');

const markdown = readFileSync('README.md', {encoding: 'utf8'});

const links = markdownLinkExtractor(markdown);
links.forEach(link => console.log(link));

Upgrading to v4.0.0

  • anchor link extraction no longer supported

Code that looked like this:

const { links } = markdownLinkExtractor(str);

Should change to this:

const links = markdownLinkExtractor(str);

Upgrading to v3.0.0

  • extended mode no longer supported
  • embedded image size parameters in ![]() no longer supported

Testing

npm test

License

See LICENSE.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].