tangled
alpha
login
or
join now
hatlink.bsky.social
/
witchsky.app
forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 💫
0
fork
atom
overview
issues
pulls
pipelines
Compare changes
Choose any two refs to compare.
base:
steam-validate
readme-update
post-text-option
main
linkat-integration
feat/tealfm
no tags found
compare:
steam-validate
readme-update
post-text-option
main
linkat-integration
feat/tealfm
no tags found
go
+2
-2
2 changed files
expand all
collapse all
unified
split
src
components
RichText.tsx
lib
strings
website.ts
+1
-1
src/components/RichText.tsx
···
13
13
const WORD_WRAP = {wordWrap: 1}
14
14
// lifted from facet detection in `RichText` impl, _without_ `gm` flags
15
15
const URL_REGEX =
16
16
-
/(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/i
16
16
+
/(^|\s|\()((https?:\/\/[\S]+)|(steam:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/i
17
17
18
18
export type RichTextProps = TextStyleProp &
19
19
Pick<TextProps, 'selectable' | 'onLayout' | 'onTextLayout'> & {
+1
-1
src/lib/strings/website.ts
···
4
4
5
5
export function sanitizeWebsiteForLink(website: string): string {
6
6
const normalized = website.toLowerCase()
7
7
-
return normalized.startsWith('https')
7
7
+
return normalized.startsWith('https') || normalized.startsWith('steam')
8
8
? normalized
9
9
: `https://${website.toLowerCase()}`
10
10
}