1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Regex fixed

This commit is contained in:
anasasilva
2018-12-16 12:52:56 +00:00
committed by Junyoung Choi
parent ea6e56842f
commit 7106f042da

View File

@@ -458,7 +458,7 @@ function getAbsolutePathsOfAttachmentsInContent (markdownContent, storagePath) {
*/ */
function importAttachments (markDownContent, filepath, storageKey, noteKey) { function importAttachments (markDownContent, filepath, storageKey, noteKey) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const nameRegex = /(!\[.+?]\()(.+?\..+?)(\))/g const nameRegex = /(!\[.*?]\()(.+?\..+?)(\))/g
let attachName = nameRegex.exec(markDownContent) let attachName = nameRegex.exec(markDownContent)
const promiseArray = [] const promiseArray = []
const beginPath = filepath.match(/\/.+\//)[0] const beginPath = filepath.match(/\/.+\//)[0]