{ body }
{ widgets }
+
{ body }
{ widgets }
diff --git a/src/linkify-matrix.ts b/src/linkify-matrix.ts
index 0b21ac1543..dbbece9033 100644
--- a/src/linkify-matrix.ts
+++ b/src/linkify-matrix.ts
@@ -21,7 +21,6 @@ import linkifyString from '@matrix-org/linkify-string';
import { RoomMember } from 'matrix-js-sdk/src/models/room-member';
import { registerCustomProtocol, registerPlugin } from '@matrix-org/linkifyjs';
-//linkifyjs/src/core/fsm
import { baseUrl } from "./utils/permalinks/MatrixToPermalinkConstructor";
import {
parsePermalink,
@@ -227,8 +226,9 @@ export const options = {
if (type === Type.URL) {
try {
const transformed = tryTransformPermalinkToLocalHref(href);
- if (transformed !== href || // if it could be converted to handle locally for matrix symbols e.g. @user:server.tdl and matrix.to
- decodeURIComponent(href).match(ELEMENT_URL_PATTERN) // for https:vector|riot...
+ if (
+ transformed !== href || // if it could be converted to handle locally for matrix symbols e.g. @user:server.tdl and matrix.to
+ decodeURIComponent(href).match(ELEMENT_URL_PATTERN) // for https links to Element domains
) {
return null;
} else {
diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts
index c79e8af826..ed4844c3ac 100644
--- a/src/utils/permalinks/Permalinks.ts
+++ b/src/utils/permalinks/Permalinks.ts
@@ -328,7 +328,7 @@ export function tryTransformEntityToPermalink(entity: string): string {
if (!entity) return null;
// Check to see if it is a bare entity for starters
- {if (entity[0] === '#' || entity[0] === '!') return makeRoomPermalink(entity);}
+ if (entity[0] === '#' || entity[0] === '!') return makeRoomPermalink(entity);
if (entity[0] === '@') return makeUserPermalink(entity);
if (entity[0] === '+') return makeGroupPermalink(entity);