mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 08:20:51 +00:00
Fixing tests
This commit is contained in:
parent
f6a16e4394
commit
c7a4161799
@ -690,7 +690,7 @@ class RichTextParserTest {
|
||||
RichTextParser()
|
||||
.parseText(textToParse, EmptyTagList)
|
||||
org.junit.Assert.assertEquals(
|
||||
"relay.shitforce.one, relayable.org, universe.nostrich.land, nos.lol, universe.nostrich.land?lang=zh, universe.nostrich.land?lang=en, relay.damus.io, relay.nostr.wirednet.jp, offchain.pub, nostr.rocks, relay.wellorder.net, nostr.oxtr.dev, universe.nostrich.land?lang=ja, relay.mostr.pub, nostr.bitcoiner.social, Nostr-Check.com, MR.Rabbit, Ancap.su, zapper.lol, smies.me, baller.hodl",
|
||||
"relay.shitforce.one, relayable.org, universe.nostrich.land, nos.lol, universe.nostrich.land?lang=zh, universe.nostrich.land?lang=en, relay.damus.io, relay.nostr.wirednet.jp, offchain.pub, nostr.rocks, relay.wellorder.net, nostr.oxtr.dev, universe.nostrich.land?lang=ja, relay.mostr.pub, nostr.bitcoiner.social, Nostr-Check.com, MR.Rabbit, Ancap.su, ⚡\uFE0Fsatscoinsv@getalby.com, miceliomad@miceliomad.github.io/nostr/, zapper.lol, smies.me, baller.hodl",
|
||||
state.urlSet.joinToString(", "),
|
||||
)
|
||||
|
||||
@ -2258,7 +2258,7 @@ class RichTextParserTest {
|
||||
"HashTag(#214)",
|
||||
"RegularText(2%)",
|
||||
"RegularText(Satscoinsv,)",
|
||||
"RegularText(⚡️satscoinsv@getalby.com)",
|
||||
"Link(⚡️satscoinsv@getalby.com)",
|
||||
"RegularText(-)",
|
||||
"RegularText(80db64657ea0358c5332c5cca01565eeddd4b8799688b1c46d3cb2d7c966671f)",
|
||||
"HashTag(#215)",
|
||||
@ -2468,7 +2468,7 @@ class RichTextParserTest {
|
||||
"HashTag(#249)",
|
||||
"RegularText(2%)",
|
||||
"RegularText(micmad,)",
|
||||
"RegularText(miceliomad@miceliomad.github.io/nostr/)",
|
||||
"Link(miceliomad@miceliomad.github.io/nostr/)",
|
||||
"RegularText(-)",
|
||||
"RegularText(cd806edcf8ff40ea94fa574ea9cd97da16e5beb2b85aac6e1d648b8388504343)",
|
||||
"HashTag(#250)",
|
||||
|
@ -214,14 +214,14 @@ class RichTextParser() {
|
||||
|
||||
if (word.startsWith("cashuA", true)) return CashuSegment(word)
|
||||
|
||||
if (startsWithNIP19Scheme(word)) return BechSegment(word)
|
||||
|
||||
if (word.startsWith("#")) return parseHash(word, tags)
|
||||
|
||||
if (word.contains("@")) {
|
||||
if (Patterns.EMAIL_ADDRESS.matcher(word).matches()) return EmailSegment(word)
|
||||
}
|
||||
|
||||
if (startsWithNIP19Scheme(word)) return BechSegment(word)
|
||||
|
||||
if (isPotentialPhoneNumber(word) && !isDate(word)) {
|
||||
if (Patterns.PHONE.matcher(word).matches()) return PhoneSegment(word)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user