-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support pasting multiple URLs in Add form
- Loading branch information
Rustem Mussabekov
committed
Feb 24, 2025
1 parent
a0a50cf
commit 2ac828d
Showing
9 changed files
with
123 additions
and
132 deletions.
There are no files selected for viewing
Binary file modified
BIN
-697 Bytes
(100%)
...eproj/project.xcworkspace/xcuserdata/exentrich.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
.modal { | ||
width: 11rem | ||
} | ||
|
||
.suggestions { | ||
display: flex; | ||
flex-wrap: wrap; | ||
align-items: center; | ||
gap: var(--padding-small); | ||
padding-bottom: var(--padding-small) | ||
} | ||
|
||
.or { | ||
color: var(--secondary-text-color) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import _ from 'lodash-es' | ||
import isURL from 'validator/es/lib/isURL' | ||
|
||
const urlPattern = /https?:\/\/[^\s]+/gi; | ||
|
||
export function extractURLs(text) { | ||
return _.uniq( | ||
(String(text)||'').match(urlPattern) || [] | ||
) | ||
.filter(url=> | ||
(url.match(/https?/g) || []).length == 1 && | ||
isURL(url, { require_protocol: true, require_tld: true }) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './getDomain' | ||
export * from './normalizeURL' | ||
export * from './isSPA' | ||
export * from './isSPA' | ||
export * from './extractURLs' |