Add support for relative permalinks (#2555)
This commit is contained in:
parent
23e58f2ea1
commit
3db8604102
2 changed files with 1 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ export default class MarkdownLink extends PureComponent {
|
|||
return;
|
||||
}
|
||||
|
||||
const match = matchPermalink(url, serverURL) || matchPermalink(url, siteURL);
|
||||
const match = matchPermalink(url, serverURL) || matchPermalink(url, siteURL) || matchPermalink(url, '');
|
||||
|
||||
if (match) {
|
||||
const teamName = match[1];
|
||||
|
|
|
|||
|
|
@ -97,10 +97,6 @@ export function getScheme(url) {
|
|||
}
|
||||
|
||||
export function matchPermalink(link, rootURL) {
|
||||
if (!rootURL) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new RegExp('^' + escapeRegex(rootURL) + '\\/([^\\/]+)\\/pl\\/(\\w+)').exec(link);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue