diff --git a/backend/src/mastodon/microformats.ts b/backend/src/mastodon/microformats.ts index a9e7bbb..05ab20a 100644 --- a/backend/src/mastodon/microformats.ts +++ b/backend/src/mastodon/microformats.ts @@ -19,7 +19,7 @@ export function enrichStatus(status: string): string { let state = 'normal' let buffer = '' - for (let i = 0, len = status.length; true; i++) { + for (let i = 0; true; i++) { const char = status[i] const eof = char === undefined const write = (s: string) => { diff --git a/backend/src/utils/parse.ts b/backend/src/utils/parse.ts index d4ea546..b5a99a0 100644 --- a/backend/src/utils/parse.ts +++ b/backend/src/utils/parse.ts @@ -15,7 +15,7 @@ export function parseHandle(query: string): Handle { const parts = query.split('@') const localPart = parts[0] - if (!/^[\w-\.]+$/.test(localPart)) { + if (!/^[\w-.]+$/.test(localPart)) { throw new Error('invalid handle: localPart: ' + localPart) }