mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 10:46:32 +00:00
Merge pull request #2253 from mbarczak/master
Fix for issue #2088 : snippet notes are not displaying in markdown
This commit is contained in:
@@ -82,9 +82,9 @@ function createAttachmentDestinationFolder (destinationStoragePath, noteKey) {
|
|||||||
* @param noteKey Key of the current note
|
* @param noteKey Key of the current note
|
||||||
*/
|
*/
|
||||||
function migrateAttachments (markdownContent, storagePath, noteKey) {
|
function migrateAttachments (markdownContent, storagePath, noteKey) {
|
||||||
if (sander.existsSync(path.join(storagePath, 'images'))) {
|
if (noteKey !== undefined && sander.existsSync(path.join(storagePath, 'images'))) {
|
||||||
const attachments = getAttachmentsInMarkdownContent(markdownContent) || []
|
const attachments = getAttachmentsInMarkdownContent(markdownContent) || []
|
||||||
if (attachments !== []) {
|
if (attachments.length) {
|
||||||
createAttachmentDestinationFolder(storagePath, noteKey)
|
createAttachmentDestinationFolder(storagePath, noteKey)
|
||||||
}
|
}
|
||||||
for (const attachment of attachments) {
|
for (const attachment of attachments) {
|
||||||
|
|||||||
Reference in New Issue
Block a user