use splitext to remove extension from notebook name

extension may not be .ipynb.
This commit is contained in:
Min RK 2015-06-07 10:56:57 -07:00
parent c85fb52ad3
commit 84f3fe647f

View File

@ -1752,7 +1752,7 @@ define(function (require) {
* @return {string} This notebook's name (excluding file extension) * @return {string} This notebook's name (excluding file extension)
*/ */
Notebook.prototype.get_notebook_name = function () { Notebook.prototype.get_notebook_name = function () {
var nbname = this.notebook_name.substring(0,this.notebook_name.length-6); var nbname = utils.splitext(this.notebook_name)[0];
return nbname; return nbname;
}; };