withspectrum/markdown-linkify

Name: markdown-linkify

Owner: Spectrum

Description: Turn plain URLs in text into Markdown links. Works in the browser and on the server.

Created: 2017-07-08 19:05:38.0

Updated: 2018-05-01 13:48:04.0

Pushed: 2018-04-28 00:30:41.0

Homepage: null

Size: 47

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

markdown-linkify

Turn plain URLs in text into Markdown links. Works in the browser and on the server.

Usage
  1. Input: "Made by folks from https://spectrum.chat"
  2. Output: "Made by folks from [https://spectrum.chat](https://spectrum.chat)"
t linkify = require('markdown-linkify');

t text = 'Made by folks from https://spectrum.chat'
t linked = linkify(text);

ole.log(linked)
> 'Made by folks from [https://spectrum.chat](http://spectrum.chat)'

We use linkify-it to detect URLs which supports major TLDs without protocol (google.com, facebook.net etc) and everything that uses a protocol. (e.g. https://bla.bullshit, mailto:hi@spectrum.chat) We err on the side of being certain and not-linkifying rather than over-linkifying.

Installation
install --save markdown-linkify
 if you have yarn installed
 add markdown-linkify
License

Licensed under the MIT License, Copyright ©? 2017 Maximilian Stoiber. See LICENSE.md for more information.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.