mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 08:20:42 +08:00
fix new tab file extension (#2755)
This commit is contained in:
parent
08c2290a04
commit
1433dc0eac
@ -133,6 +133,8 @@ const handleResponseForSave = async (e, { id, filename, markdown, pathname, opti
|
||||
}
|
||||
|
||||
filePath = path.resolve(filePath)
|
||||
const extension = path.extname(filePath) || '.md'
|
||||
filePath = !filePath.endsWith(extension) ? filePath += extension : filePath
|
||||
return writeMarkdownFile(filePath, markdown, options, win)
|
||||
.then(() => {
|
||||
if (!alreadyExistOnDisk) {
|
||||
|
Loading…
Reference in New Issue
Block a user