1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

Merge pull request #3369 from haiwen/fix-wiki-bug

fix index.md bug && update url wikis-->published
This commit is contained in:
Daniel Pan
2019-04-26 16:04:44 +08:00
committed by GitHub
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 {