1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 01:12:03 +00:00

[wiki markdown file] modified links in the file content (#4517)

* only modified links of inserted files from the current library
This commit is contained in:
llj
2020-04-08 16:51:21 +08:00
committed by GitHub
parent 5a140d35c9
commit 605068cb7a
2 changed files with 19 additions and 8 deletions

View File

@@ -714,6 +714,11 @@ export const Utils = {
}
},
isInternalFileLink: function(url, repoID) {
var re = new RegExp(serviceURL + '/lib/' + repoID + '/file.*');
return re.test(url);
},
isInternalMarkdownLink: function(url, repoID) {
var re = new RegExp(serviceURL + '/lib/' + repoID + '.*\.md$');
return re.test(url);