1.0.1 • Published 5 years ago

gtech-markdown-parser v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Extrai links de arquivo Markdown

Esta biblioteca receba uma string (em formato Markdown) e devolve um vetor de objetos com todos os links encontrados.

Essa versão abrange os seguintes tipos de links markdown:

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[I'm a relative reference to a repository file](../blob/master/LICENSE)

Como instalar:

$ npm install gtech-markdown-parser

Como utilizar:

const MarkdownParser = require('gtech-markdown-parser');
const markdownString = `[I'm an inline-style link](https://www.google.com)`;
const links = MarkdownParser.getLinksFromMd(markdownString);

//return [ { href: 'https://www.google.com', 
//           text: 'I\'m an inline-style link' } ]