Add support for relative permalinks (#2555)

This commit is contained in:
Elias Nahum 2019-02-08 11:54:26 -03:00 committed by Saturnino Abril
parent 23e58f2ea1
commit 3db8604102
2 changed files with 1 additions and 5 deletions

View file

@ -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];

View file

@ -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);
}