Skip to main content

interweave-autolink

Build Status npm version npm deps

Provides URL, IP, email, and hashtag autolinking support for Interweave.

<Interweave
content="This contains a URL, https://github.com/milesj/interweave, and a hashtag, #interweave, that will be converted to an anchor link!"
matchers={[new UrlMatcher('url'), new HashtagMatcher('hashtag')]}
/>

Installation

yarn add interweave interweave-autolink
// Or
npm install interweave interweave-autolink

Documentation

https://interweave.dev/docs/exts/autolink

Index

Type aliases

EmailMatch

EmailMatch: Pick<EmailProps, email | emailParts>

HashtagMatch

HashtagMatch: Pick<HashtagProps, hashtag>

UrlMatch

UrlMatch: Pick<UrlProps, url | urlParts>

Variables

constEMAIL_DISTINCT_PATTERN

EMAIL_DISTINCT_PATTERN: RegExp = ...

constEMAIL_PATTERN

EMAIL_PATTERN: RegExp = ...

constEMAIL_USERNAME

EMAIL_USERNAME: RegExp = ...

constEMAIL_USERNAME_PART

EMAIL_USERNAME_PART: RegExp = ...

constHASHTAG_PATTERN

HASHTAG_PATTERN: RegExp = ...

constIP_PATTERN

IP_PATTERN: RegExp = ...

constIP_V4

IP_V4: RegExp = ...

constIP_V4_PART

IP_V4_PART: RegExp = ...

constMENTION_PATTERN

MENTION_PATTERN: RegExp = ...

constTOP_LEVEL_TLDS

TOP_LEVEL_TLDS: string[] = ...

constURL_AUTH

URL_AUTH: RegExp = ...

constURL_FRAGMENT

URL_FRAGMENT: RegExp = ...

constURL_HOST

URL_HOST: RegExp = ...

constURL_PATH

URL_PATH: RegExp = ...

constURL_PATTERN

URL_PATTERN: RegExp = ...

constURL_PORT

URL_PORT: RegExp = ...

constURL_QUERY

URL_QUERY: RegExp = ...

constURL_SCHEME

URL_SCHEME: RegExp = ...

constVALID_ALNUM_CHARS

VALID_ALNUM_CHARS: RegExp = ...

constVALID_PATH_CHARS

VALID_PATH_CHARS: RegExp = ...