|
@@ -316,7 +316,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
const onPressEnterForCreateHandler = async(inputText: string) => {
|
|
const onPressEnterForCreateHandler = async(inputText: string) => {
|
|
|
setNewPageInputShown(false);
|
|
setNewPageInputShown(false);
|
|
|
const parentPath = pathUtils.addTrailingSlash(page.path as string);
|
|
const parentPath = pathUtils.addTrailingSlash(page.path as string);
|
|
|
- const newPagePath = `${parentPath}${inputText}`;
|
|
|
|
|
|
|
+ const newPagePath = nodePath.resolve(parentPath, inputText);
|
|
|
const isCreatable = pagePathUtils.isCreatablePage(newPagePath);
|
|
const isCreatable = pagePathUtils.isCreatablePage(newPagePath);
|
|
|
|
|
|
|
|
if (!isCreatable) {
|
|
if (!isCreatable) {
|
|
@@ -326,7 +326,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
|
|
|
|
|
let initBody = '';
|
|
let initBody = '';
|
|
|
if (isEnabledAttachTitleHeader) {
|
|
if (isEnabledAttachTitleHeader) {
|
|
|
- const pageTitle = pathUtils.addHeadingSlash(nodePath.basename(newPagePath));
|
|
|
|
|
|
|
+ const pageTitle = nodePath.basename(newPagePath);
|
|
|
initBody = pathUtils.attachTitleHeader(pageTitle);
|
|
initBody = pathUtils.attachTitleHeader(pageTitle);
|
|
|
}
|
|
}
|
|
|
|
|
|