UNPKG

remarkable-external-link

Version:

Remarkable plugin that adds `target` and `rel` attributes on external links. Also, provide ability to insert text/html inside and/or outside a link.

26 lines (21 loc) 518 B
import { Remarkable } from 'remarkable'; export default function remarkableExternalLink (md: Remarkable, options: configOptions): void; export type detectExternalLinkConfig = { hosts: string[]; }; export type configOptions = { hosts?: []; host?: string; target?: string; rel?: string; externalOnly?: boolean; beforeLink?: string; beforeLinkText?: string; afterLinkText?: string; afterLink?: string; }; export type defaultOptions = { rel: string; target: string; externalOnly: boolean; };