mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
use splitext to remove extension from notebook name
extension may not be .ipynb.
This commit is contained in:
parent
c85fb52ad3
commit
84f3fe647f
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user