From df2f7feb80d611c9ee65df47db2cd9dd0a7cb09f 2012-05-31 20:08:29 From: Matthias BUSSONNIER Date: 2012-05-31 20:08:29 Subject: [PATCH] space after function keyword in context-hint --- diff --git a/IPython/frontend/html/notebook/static/js/context-hint.js b/IPython/frontend/html/notebook/static/js/context-hint.js index e109bdd..27ce4fe 100644 --- a/IPython/frontend/html/notebook/static/js/context-hint.js +++ b/IPython/frontend/html/notebook/static/js/context-hint.js @@ -1,5 +1,5 @@ // highly adapted for codemiror jshint -(function() { +(function () { "use strict"; function forEach(arr, f) { @@ -19,7 +19,7 @@ return arr.indexOf(item) != -1; } - CodeMirror.contextHint = function(editor) { + CodeMirror.contextHint = function (editor) { // Find the token at the cursor var cur = editor.getCursor(), token = editor.getTokenAt(cur), @@ -46,7 +46,7 @@ } // find all 'words' of current cell - var getAllTokens = function(editor) { + var getAllTokens = function (editor) { var found = []; // add to found if not already in it @@ -85,7 +85,7 @@ function getCompletions(token, editor) { var candidates = getAllTokens(editor); // filter all token that have a common start (but nox exactly) the lenght of the current token - var lambda = function(x) { + var lambda = function (x) { return (x.indexOf(token.string) == 0 && x != token.string) }; var filterd = candidates.filter(lambda);