fix(notes): limit, add new line split, remove links split
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m7s

This commit is contained in:
en 2025-02-27 17:25:50 +01:00
parent 4ea00d1af6
commit 700e2e1e4e

View File

@ -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)
}