From a32ceb29e2372cbd951fa8880ba33f6b33d07c13 2012-05-04 07:13:43 From: Matthias BUSSONNIER Date: 2012-05-04 07:13:43 Subject: [PATCH] fix tooltip on token with number fixes #1696 allow number in matched token for tooltip, except first position also prevent matching token starting wit a dot --- diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 26088b5..94eace9 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -1141,7 +1141,7 @@ var IPython = (function (IPython) { // remove everythin after last open bracket endBracket = /\([^\(]*$/g; func = func.replace(endBracket,""); - var re = /[a-zA-Z._]+$/g; + var re = /[a-z_][0-9a-z._]+$/gi; // casse insensitive var msg_id = this.kernel.object_info_request(re.exec(func)); if(typeof(msg_id)!='undefined'){ this.msg_cell_map[msg_id] = cell.cell_id;