Rename and reformat Element URL pattern
This is just a code style cleanup. There are no behaviour changes in this commit.
This commit is contained in:
@@ -331,7 +331,7 @@ export function tryTransformPermalinkToLocalHref(permalink: string): string {
|
||||
return permalink;
|
||||
}
|
||||
|
||||
const m = permalink.match(matrixLinkify.VECTOR_URL_PATTERN);
|
||||
const m = permalink.match(matrixLinkify.ELEMENT_URL_PATTERN);
|
||||
if (m) {
|
||||
return m[1];
|
||||
}
|
||||
@@ -365,7 +365,7 @@ export function getPrimaryPermalinkEntity(permalink: string): string {
|
||||
|
||||
// If not a permalink, try the vector patterns.
|
||||
if (!permalinkParts) {
|
||||
const m = permalink.match(matrixLinkify.VECTOR_URL_PATTERN);
|
||||
const m = permalink.match(matrixLinkify.ELEMENT_URL_PATTERN);
|
||||
if (m) {
|
||||
// A bit of a hack, but it gets the job done
|
||||
const handler = new ElementPermalinkConstructor("http://localhost");
|
||||
|
||||
Reference in New Issue
Block a user