UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

25 lines (24 loc) 1.57 kB
type LinkMarkupRuleData = { title?: string; href: string; }; export declare const LINK_REGEXP: import("../../util/regexp.js").NamedRegExp<LinkMarkupRuleData>; /** * Markdown-style link. * - Link in standard Markdown format, e.g. `[Google Maps](http://google.com/maps)` * - If no title is specified a cleaned up version of the URL will be used, e.g. `google.com/maps` * - Does not need space before/after the link. * - If link is not valid (using `new URL(url)` then unparsed text will be returned. * - For security only `http://` or `https://` links will work (if invalid the unparsed text will be returned). */ export declare const LINK_RULE: import("../util/rule.js").MarkupRule; export declare const AUTOLINK_REGEXP: import("../../util/regexp.js").NamedRegExp<LinkMarkupRuleData>; /** * Autolinked URL starts with `scheme://` (any scheme in `options.schemes`) and matches an unlimited number of non-space characters. * - If followed by space and then text in `()` round or `[]` square brackets that will be used as the title, e.g. `http://google.com/maps (Google Maps)` or `http://google.com/maps [Google Maps]` (this syntax is from Todoist and maybe other things too). * - If no title is specified a cleaned up version of the URL will be used, e.g. `google.com/maps` * - If link is not valid (using `new URL(url)` then unparsed text will be returned. * - For security only schemes that appear in `options.schemes` will match (defaults to `http:` and `https:`). */ export declare const AUTOLINK_RULE: import("../util/rule.js").MarkupRule; export {};