mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-24 21:07:17 +00:00
update comment
This commit is contained in:
@@ -135,8 +135,7 @@ class WikiMarkdownViewer extends React.Component {
|
|||||||
changeInlineNode = (item) => {
|
changeInlineNode = (item) => {
|
||||||
let url, imagePath;
|
let url, imagePath;
|
||||||
|
|
||||||
// change image url
|
if (item.type == 'image' && isPublicWiki) { // change image url
|
||||||
if (item.type == 'image' && isPublicWiki) {
|
|
||||||
url = item.data.src;
|
url = item.data.src;
|
||||||
const re = new RegExp(serviceURL + '/lib/' + repoID +'/file.*raw=1');
|
const re = new RegExp(serviceURL + '/lib/' + repoID +'/file.*raw=1');
|
||||||
// different repo
|
// different repo
|
||||||
@@ -153,9 +152,8 @@ class WikiMarkdownViewer extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
item.data.src = serviceURL + '/view-image-via-public-wiki/?slug=' + slug + '&path=' + imagePath;
|
item.data.src = serviceURL + '/view-image-via-public-wiki/?slug=' + slug + '&path=' + imagePath;
|
||||||
} else if (item.type == 'link') {
|
} else if (item.type == 'link') { // change link url
|
||||||
url = item.data.href;
|
url = item.data.href;
|
||||||
console.log(Utils.isInternalFileLink(url, repoID));
|
|
||||||
if (Utils.isInternalFileLink(url, repoID)) { // change file url
|
if (Utils.isInternalFileLink(url, repoID)) { // change file url
|
||||||
if (Utils.isInternalMarkdownLink(url, repoID)) {
|
if (Utils.isInternalMarkdownLink(url, repoID)) {
|
||||||
let path = Utils.getPathFromInternalMarkdownLink(url, repoID);
|
let path = Utils.getPathFromInternalMarkdownLink(url, repoID);
|
||||||
|
Reference in New Issue
Block a user