fix(notes): limit, add new line split, remove links split
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m7s
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m7s
This commit is contained in:
parent
4ea00d1af6
commit
700e2e1e4e
@ -18,13 +18,13 @@ export const useTextLimit = (
|
||||
filteredText: string
|
||||
indices: number[]
|
||||
} => {
|
||||
const words = text.split(' ')
|
||||
const words = text.split(/[\s\n]+/)
|
||||
const filteredWords: string[] = []
|
||||
const indices: number[] = []
|
||||
let currentIndex = 0
|
||||
|
||||
words.forEach((word) => {
|
||||
if (!word.startsWith('nostr:')) {
|
||||
if (!(word.startsWith('nostr:') || word.startsWith('http'))) {
|
||||
filteredWords.push(word)
|
||||
indices.push(currentIndex)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user