Skip to content

Commit

Permalink
📝 Add docs comment on new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Apr 20, 2016
1 parent 359a30c commit b7b0a3b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/mixins/canvas-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,14 @@ export default class CanvasDrawer extends Mixin {
renderData.context.fill()
}

/**
* Returns an array of tokens by line.
*
* @param {number} startRow The start row
* @param {number} endRow The end row
* @return {Array<Array>} An array of tokens by line
* @access private
*/
tokenLinesForScreenRows (startRow, endRow) {
const editor = this.getTextEditor()
let tokenLines = []
Expand Down Expand Up @@ -503,6 +511,15 @@ export default class CanvasDrawer extends Mixin {
return new RegExp(_.escapeRegExp(regexp.slice(0, -1)), 'g')
}

/**
* Returns the regexp to replace invisibles substitution characters
* in editor lines.
*
* @param {Object} line the tokenized line
* @return {RegExp} the regular expression to match invisible characters
* @deprecated Is used only to support Atom version before display layer API
* @access private
*/
getInvisibleRegExpForLine (line) {
if ((line != null) && (line.invisibles != null)) {
const invisibles = []
Expand Down

0 comments on commit b7b0a3b

Please sign in to comment.