diff --git a/README.md b/README.md index 9c48ded..ff99b8a 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,14 @@ If you want to paste images in markdown, welcome to use my other plugin:[md-past I have fixed all the issues I met. If you find any issues, please report them to [issue](https://github.com/dzylikecode/VSCodeExt-docsify-Preview/issues) -The scroll will be in the wrong position when you save the markdown file if the current markdown file can't be found in the sidebar. I find the reason is that Docsify won't execute the function `hook.ready` if the Markdown file is not in the sidebar. So you'd better add the markdown file to the sidebar first before writing the Markdown file with joy. - ## Release Notes +### 1.2.0 + +fix: issue + +see more detail at https://github.com/dzylikecode/VSCodeExt-docsify-Preview/pull/11 + ### 1.1.0 - fix: diff --git a/package.json b/package.json index 15dd054..bf06ff9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "docsify-preview", "displayName": "docsify-Preview", "description": "write docs easily with docsify", - "version": "1.1.2", + "version": "1.2.0", "engines": { "vscode": "^1.71.0" }, diff --git a/src/server/httpServer.js b/src/server/httpServer.js index ab18ba9..170335d 100644 --- a/src/server/httpServer.js +++ b/src/server/httpServer.js @@ -43,6 +43,12 @@ let httpServer = { if (fs.existsSync(filePath)) { response.sendFile(filePath); } else { + response.status(404).send({ + error: { + status: 404, + message: "File not found: " + filePath, + }, + }); console.log("File not found: " + filePath); } });