mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Merge pull request #3594 from Carreau/fixes-3563
Fix duplicate completion in notebook comparaison between kernel completion and context-completin were returning duplicate entry in some cases, due to trailing space. sripping trailing space in comparaison prevent this. closes #3563
This commit is contained in:
commit
2e417e82f0
@ -15,10 +15,10 @@ var IPython = (function (IPython) {
|
||||
}
|
||||
|
||||
function _existing_completion(item, completion_array){
|
||||
for( var c in completion_array ) {
|
||||
if(completion_array[c].substr(-item.length) == item)
|
||||
{ return true; }
|
||||
}
|
||||
for( var c in completion_array ) {
|
||||
if(completion_array[c].trim().substr(-item.length) == item)
|
||||
{ return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user