replace backlash when moving notebooks on windows (#14186)

This commit is contained in:
Barbara Valdez
2021-02-07 20:17:30 -08:00
committed by GitHub
parent 86aa24e198
commit 06bace1fcf

View File

@@ -346,7 +346,7 @@ export class BookTocManager implements IBookTocManager {
this.newSection = sectionTOC;
}
fileName = fileName === undefined ? notebookPath.name : path.parse(fileName).name;
this.newSection.file = path.sep.concat(fileName);
this.newSection.file = path.sep.concat(fileName).replace(/\\/g, '/');
this.newSection.title = notebook.book.title;
if (book.version === BookVersion.v1) {
// here we only convert if is v1 because we are already using the v2 notation for every book that we read.