]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Add license
authorDaniel Imms <daimms@microsoft.com>
Fri, 10 Feb 2017 04:12:35 +0000 (20:12 -0800)
committerDaniel Imms <daimms@microsoft.com>
Fri, 10 Feb 2017 04:12:35 +0000 (20:12 -0800)
src/EscapeSequences.ts
src/Linkifier.ts

index 34dfde90f909d4e6b4f6250af01d27eae4f4af1d..9542658faaeddb783bdd88d9509fc101a09e81a7 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * @license MIT
+ */
+
 /**
  * C0 control codes
  * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes
index e502289ed45024b8d549bb890e8be475b09514ea..693b142963760be970398de0f13df75a076acc9c 100644 (file)
@@ -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.
  */