interweave-autolink
Version:
URL, IP, email, and hashtag autolinking support for Interweave.
15 lines • 696 B
TypeScript
import React from 'react';
import { ChildrenNode, Matcher, MatchResponse, Node } from 'interweave';
import { UrlMatcherOptions, UrlProps } from './types';
export declare type UrlMatch = Pick<UrlProps, 'url' | 'urlParts'>;
export declare class UrlMatcher extends Matcher<UrlProps, UrlMatcherOptions> {
constructor(name: string, options?: UrlMatcherOptions, factory?: React.ComponentType<UrlProps> | null);
replaceWith(children: ChildrenNode, props: UrlProps): Node;
asTag(): string;
match(string: string): MatchResponse<UrlMatch> | null;
/**
* Package the matched response.
*/
handleMatches(matches: string[]): UrlMatch;
}
//# sourceMappingURL=UrlMatcher.d.ts.map