feat: set image folder to .assets, create folder without filename extension. (#2905)

This commit is contained in:
Luo Tao 2022-01-21 21:29:48 +08:00 committed by GitHub
parent 2a9353e87c
commit ddd1879c61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -804,7 +804,7 @@ export default {
const getResolvedImagePath = imagePath => { const getResolvedImagePath = imagePath => {
// Use filename only when the tab is saved on disk. // Use filename only when the tab is saved on disk.
const replacement = pathname ? filename : '' const replacement = pathname ? filename : ''
return imagePath.replace(/\${filename}/g, replacement) return imagePath.replace(/\${filename}/g, replacement.replace(/\.[^/.]+$/, ''))
} }
const resolvedImageFolderPath = getResolvedImagePath(imageFolderPath) const resolvedImageFolderPath = getResolvedImagePath(imageFolderPath)