1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

fix index.md bug && update url wikis-->published

This commit is contained in:
ilearnit
2019-04-24 08:40:23 +00:00
parent abff0ecad5
commit fdff270e5c
12 changed files with 33 additions and 23 deletions

View File

@@ -473,19 +473,19 @@ export const Utils = {
isWikiInternalMarkdownLink: function(url, slug) {
slug = encodeURIComponent(slug);
var re = new RegExp(serviceURL + '/wikis/' + slug + '.*\.md$');
var re = new RegExp(serviceURL + '/published/' + slug + '.*\.md$');
return re.test(url);
},
isWikiInternalDirLink: function(url, slug) {
slug = encodeURIComponent(slug);
var re = new RegExp(serviceURL + '/wikis/' + slug + '.*');
var re = new RegExp(serviceURL + '/published/' + slug + '.*');
return re.test(url);
},
getPathFromWikiInternalMarkdownLink: function(url, slug) {
slug = encodeURIComponent(slug);
var re = new RegExp(serviceURL + '/wikis/' + slug + '(.*\.md)');
var re = new RegExp(serviceURL + '/published/' + slug + '(.*\.md)');
var array = re.exec(url);
var path = array[1];
try {
@@ -499,7 +499,7 @@ export const Utils = {
getPathFromWikiInternalDirLink: function(url, slug) {
slug = encodeURIComponent(slug);
var re = new RegExp(serviceURL + '/wikis/' + slug + '(/.*)');
var re = new RegExp(serviceURL + '/published/' + slug + '(/.*)');
var array = re.exec(url);
var path = array[1];
try {