forked from Mirrors/elk
feat: check if title contains a username
This commit is contained in:
parent
05bbd6ba4d
commit
1180311984
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ const providerName = $computed(() => props.card.providerName ? props.card.provid
|
|||
|
||||
const gitHubCards = $(useFeatureFlag('experimentalGitHubCards'))
|
||||
|
||||
// TODO: regex test the card.title value
|
||||
const isMastodonLink = true
|
||||
// checks if title contains a username
|
||||
const isMastodonLink = props.card.title.match(/@+[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/gi)
|
||||
|
||||
// TODO: handle card.type: 'photo' | 'video' | 'rich';
|
||||
const cardTypeIconMap: Record<CardType, string> = {
|
||||
|
|
Loading…
Reference in a new issue