1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-05 22:57:29 +02:00

All: Fixed link issue following last update

This commit is contained in:
Laurent Cozic
2019-09-10 09:25:58 +01:00
parent 45a820bb35
commit e03ef78049
3 changed files with 32 additions and 4 deletions

View File

@@ -39,7 +39,13 @@ urlUtils.prependBaseUrl = function(url, baseUrl) {
}
};
urlUtils.isResourceUrl = function(url) {
return !!url.match(/^(joplin:\/\/|:\/)[0-9a-zA-Z]{32}(|#.*)$/);
};
urlUtils.parseResourceUrl = function(url) {
if (!urlUtils.isResourceUrl(url)) return null;
const filename = url.split('/').pop();
const splitted = filename.split('#');