mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 04:20:36 +08:00
feat: set image folder to .assets, create folder without filename extension. (#2905)
This commit is contained in:
parent
2a9353e87c
commit
ddd1879c61
@ -804,7 +804,7 @@ export default {
|
||||
const getResolvedImagePath = imagePath => {
|
||||
// Use filename only when the tab is saved on disk.
|
||||
const replacement = pathname ? filename : ''
|
||||
return imagePath.replace(/\${filename}/g, replacement)
|
||||
return imagePath.replace(/\${filename}/g, replacement.replace(/\.[^/.]+$/, ''))
|
||||
}
|
||||
|
||||
const resolvedImageFolderPath = getResolvedImagePath(imageFolderPath)
|
||||
|
Loading…
Reference in New Issue
Block a user