Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Still can't figure out how to make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariusz Niemczyk committed Dec 3, 2021
1 parent 7db8664 commit 57ddd7c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/linkify-matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,14 @@ function matrixOpaqueIdLinkifyParser({
// because 'localhost' is tokenised to the localhost token,
// usernames @localhost:foo.com are otherwise not matched!
LOCALHOST,
LEFT_BRACKET,
RIGHT_BRACKET,
} = scanner.tokens;

const S_START = parser.start;
const Localpart = utils.createTokenClass(name, { isLink: true });

const localpartTokens = [
DOMAIN,
// IPV4 necessity
NUM,
TLD,

Expand All @@ -82,8 +81,6 @@ function matrixOpaqueIdLinkifyParser({
SYM,
UNDERSCORE,
TEXT,
LEFT_BRACKET,
RIGHT_BRACKET,
];

const INITIAL_TOKEN_STATE = S_START.tt(token);
Expand All @@ -95,7 +92,6 @@ function matrixOpaqueIdLinkifyParser({
}

const COLON_STATE = LOCALPART_STATE.tt(COLON);
COLON_STATE.tt(COLON, LOCALPART_STATE);

COLON_STATE.tt(LOCALHOST, LOCALPART_STATE);
COLON_STATE.tt(TLD, LOCALPART_STATE);
Expand Down

0 comments on commit 57ddd7c

Please sign in to comment.