Skip to content

Commit

Permalink
Improve jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Feb 15, 2017
1 parent 5183332 commit 3b62aa4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Linkifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class Linkifier {
/**
* Registers a link matcher, allowing custom link patterns to be matched and
* handled.
* @param {RegExp} regex The regular expression the search for, specifically
* @param {RegExp} regex The regular expression to search for, specifically
* this searches the textContent of the rows. You will want to use \s to match
* a space ' ' character for example.
* @param {LinkHandler} handler The callback when the link is called.
Expand Down
16 changes: 9 additions & 7 deletions src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1299,13 +1299,15 @@ Terminal.prototype.attachHypertextLinkHandler = function(handler) {


/**
* Registers a link matcher, allowing custom link patterns to be matched and
* handled.
* @param {RegExp} regex The regular expression the search for.
* @param {LinkHandler} handler The callback when the link is called.
* @param {number} matchIndex The index of the link from the regex.match(html)
* call. This defaults to 0 (for regular expressions without capture groups).
* @return {number} The ID of the new matcher, this can be used to deregister.
* Registers a link matcher, allowing custom link patterns to be matched and
* handled.
* @param {RegExp} regex The regular expression to search for, specifically
* this searches the textContent of the rows. You will want to use \s to match
* a space ' ' character for example.
* @param {LinkHandler} handler The callback when the link is called.
* @param {number} matchIndex The index of the link from the regex.match(html)
* call. This defaults to 0 (for regular expressions without capture groups).
* @return {number} The ID of the new matcher, this can be used to deregister.
*/
Terminal.prototype.registerLinkMatcher = function(regex, handler, matchIndex) {
if (this.linkifier) {
Expand Down

0 comments on commit 3b62aa4

Please sign in to comment.