You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Desktop: Various improvements to Markdown import and export (#5290)
In preparation for #5224
This commit is contained in:
@@ -100,6 +100,12 @@ const markdownUtils = {
|
||||
return output;
|
||||
},
|
||||
|
||||
replaceResourceUrl(md: string, urlToReplace: string, id: string) {
|
||||
const linkRegex = `(?<=\\]\\()\\<?${urlToReplace}\\>?(?=.*\\))`;
|
||||
const reg = new RegExp(linkRegex, 'g');
|
||||
return md.replace(reg, `:/${id}`);
|
||||
},
|
||||
|
||||
extractImageUrls(md: string) {
|
||||
return markdownUtils.extractFileUrls(md,true);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user