mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Add license
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* C0 control codes
|
||||
* See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes
|
||||
|
||||
+15
-8
@@ -1,9 +1,10 @@
|
||||
/**
|
||||
* The time to wait after a row is changed before it is linkified. This prevents
|
||||
* the costly operation of searching every row multiple times, pntentially a
|
||||
* huge aount of times.
|
||||
* @license MIT
|
||||
*/
|
||||
const TIME_BEFORE_LINKIFY = 200;
|
||||
|
||||
export type LinkHandler = (uri: string) => void;
|
||||
|
||||
type LinkMatcher = {id: number, regex: RegExp, handler: LinkHandler};
|
||||
|
||||
const protocolClause = '(https?:\\/\\/)';
|
||||
const domainCharacterSet = '[\\da-z\\.-]+';
|
||||
@@ -20,12 +21,18 @@ const start = '(?:^|' + negatedDomainCharacterSet + ')(';
|
||||
const end = ')($|' + negatedPathCharacterSet + ')';
|
||||
const strictUrlRegex = new RegExp(start + protocolClause + bodyClause + end);
|
||||
|
||||
export type LinkHandler = (uri: string) => void;
|
||||
|
||||
type LinkMatcher = {id: number, regex: RegExp, handler: LinkHandler};
|
||||
|
||||
/**
|
||||
* The ID of the built in http(s) link matcher.
|
||||
*/
|
||||
const HYPERTEXT_LINK_MATCHER_ID = 0;
|
||||
|
||||
/**
|
||||
* The time to wait after a row is changed before it is linkified. This prevents
|
||||
* the costly operation of searching every row multiple times, pntentially a
|
||||
* huge aount of times.
|
||||
*/
|
||||
const TIME_BEFORE_LINKIFY = 200;
|
||||
|
||||
/**
|
||||
* The Linkifier applies links to rows shortly after they have been refreshed.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user