mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
regex fixed again
This commit is contained in:
committed by
Junyoung Choi
parent
9d47f319a0
commit
3d6f670e8d
@@ -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 attachPath = []
|
const attachPath = []
|
||||||
|
|||||||
@@ -191,6 +191,8 @@
|
|||||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
||||||
"\\.(css|less|styl)$": "identity-obj-proxy"
|
"\\.(css|less|styl)$": "identity-obj-proxy"
|
||||||
},
|
},
|
||||||
|
"verbose": true,
|
||||||
|
"testURL": "http://localhost/",
|
||||||
"setupFiles": [
|
"setupFiles": [
|
||||||
"<rootDir>/tests/jest.js",
|
"<rootDir>/tests/jest.js",
|
||||||
"jest-localstorage-mock"
|
"jest-localstorage-mock"
|
||||||
|
|||||||
Reference in New Issue
Block a user