/
githubmirror
/
tabby
Обзор
Документация
Войти
/
githubmirror
/
tabby
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tabby-linkifier/src/api.ts
24 строки
693 B
Eugene
fixed #10482 - duplicate browser tab opening when clicking a link with an IP in it
24 май 2025, 16:19
Не верифицирован
24 май 2025, 16:19
e0c34ef
Код
Авторство
О чём код?
import { BaseTerminalTabComponent } from 'tabby-terminal' export abstract class LinkHandler { regex: RegExp priority = 1 convert (uri: string, _tab?: BaseTerminalTabComponent<any>): Promise<string>|string { return uri } verify (_uri: string, _tab?: BaseTerminalTabComponent<any>): Promise<boolean>|boolean { return true } abstract handle (uri: string, tab?: BaseTerminalTabComponent<any>): void private _fullMatchRegex: RegExp | null = null get fullMatchRegex (): RegExp { if (!this._fullMatchRegex) { this._fullMatchRegex = new RegExp(`^${this.regex.source}$`) } return this._fullMatchRegex } }