2021-05-09 10:53:18 +01:00
|
|
|
{-# LANGUAGE BlockArguments #-}
|
2022-11-24 13:13:26 +00:00
|
|
|
{-# LANGUAGE NamedFieldPuns #-}
|
|
|
|
{-# LANGUAGE OverloadedLists #-}
|
2021-05-09 10:53:18 +01:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
|
|
|
|
module MarkdownTests where
|
|
|
|
|
2022-11-24 13:13:26 +00:00
|
|
|
import Data.List.NonEmpty (NonEmpty)
|
2021-05-09 10:53:18 +01:00
|
|
|
import Data.Text (Text)
|
2025-01-30 10:06:26 +00:00
|
|
|
import qualified Data.Text as T
|
2021-05-09 10:53:18 +01:00
|
|
|
import Simplex.Chat.Markdown
|
|
|
|
import System.Console.ANSI.Types
|
|
|
|
import Test.Hspec
|
|
|
|
|
|
|
|
markdownTests :: Spec
|
|
|
|
markdownTests = do
|
|
|
|
textFormat
|
|
|
|
secretText
|
|
|
|
textColor
|
2022-02-22 18:18:35 +00:00
|
|
|
textWithUri
|
2022-02-24 07:55:18 +00:00
|
|
|
textWithEmail
|
|
|
|
textWithPhone
|
2025-01-29 13:04:48 +00:00
|
|
|
textWithMentions
|
2022-03-29 13:18:44 +01:00
|
|
|
multilineMarkdownList
|
2021-05-09 10:53:18 +01:00
|
|
|
|
2025-01-30 10:06:26 +00:00
|
|
|
infixr 1 ==>, <==, <==>, ==>>, <<==, <<==>>
|
|
|
|
|
|
|
|
(==>) :: Text -> Markdown -> Expectation
|
|
|
|
s ==> m = parseMarkdown s `shouldBe` m
|
|
|
|
|
|
|
|
(<==) :: Text -> Markdown -> Expectation
|
|
|
|
s <== m = s <<== markdownToList m
|
|
|
|
|
|
|
|
(<==>) :: Text -> Markdown -> Expectation
|
|
|
|
s <==> m = (s ==> m) >> (s <== m)
|
|
|
|
|
|
|
|
(==>>) :: Text -> MarkdownList -> Expectation
|
|
|
|
s ==>> ft = parseMaybeMarkdownList s `shouldBe` Just ft
|
|
|
|
|
|
|
|
(<<==) :: Text -> MarkdownList -> Expectation
|
|
|
|
s <<== ft = T.concat (map markdownText ft) `shouldBe` s
|
|
|
|
|
|
|
|
(<<==>>) :: Text -> MarkdownList -> Expectation
|
|
|
|
s <<==>> ft = (s ==>> ft) >> (s <<== ft)
|
|
|
|
|
2025-02-03 08:55:46 +00:00
|
|
|
bold :: Text -> Markdown
|
|
|
|
bold = markdown Bold
|
|
|
|
|
2021-05-09 10:53:18 +01:00
|
|
|
textFormat :: Spec
|
|
|
|
textFormat = describe "text format (bold)" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is *bold formatted* text"
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> "this is " <> bold "bold formatted" <> " text"
|
2025-01-30 10:06:26 +00:00
|
|
|
"*bold formatted* text"
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> bold "bold formatted" <> " text"
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is *bold*"
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> "this is " <> bold "bold"
|
2025-01-30 10:06:26 +00:00
|
|
|
" *bold* text"
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> " " <> bold "bold" <> " text"
|
2025-01-30 10:06:26 +00:00
|
|
|
" *bold* text"
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> " " <> bold "bold" <> " text"
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is *bold* "
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> "this is " <> bold "bold" <> " "
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is *bold* "
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> "this is " <> bold "bold" <> " "
|
2021-05-09 10:53:18 +01:00
|
|
|
it "ignored as markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is * unformatted * text"
|
|
|
|
<==> "this is * unformatted * text"
|
|
|
|
"this is *unformatted * text"
|
|
|
|
<==> "this is *unformatted * text"
|
|
|
|
"this is * unformatted* text"
|
|
|
|
<==> "this is * unformatted* text"
|
|
|
|
"this is **unformatted** text"
|
|
|
|
<==> "this is **unformatted** text"
|
|
|
|
"this is*unformatted* text"
|
|
|
|
<==> "this is*unformatted* text"
|
|
|
|
"this is *unformatted text"
|
|
|
|
<==> "this is *unformatted text"
|
2025-02-03 08:55:46 +00:00
|
|
|
"*this* is *unformatted text"
|
|
|
|
<==> bold "this" <> " is *unformatted text"
|
2021-05-09 10:53:18 +01:00
|
|
|
it "ignored internal markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is *long _bold_ (not italic)* text"
|
2025-02-03 08:55:46 +00:00
|
|
|
<==> "this is " <> bold "long _bold_ (not italic)" <> " text"
|
2025-01-30 10:06:26 +00:00
|
|
|
"snippet: `this is *bold text*`"
|
|
|
|
<==> "snippet: " <> markdown Snippet "this is *bold text*"
|
2021-05-09 10:53:18 +01:00
|
|
|
|
|
|
|
secretText :: Spec
|
|
|
|
secretText = describe "secret text" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is #black_secret# text"
|
|
|
|
<==> "this is " <> markdown Secret "black_secret" <> " text"
|
|
|
|
"##black_secret### text"
|
|
|
|
<==> markdown Secret "#black_secret##" <> " text"
|
|
|
|
"this is #black secret# text"
|
|
|
|
<==> "this is " <> markdown Secret "black secret" <> " text"
|
|
|
|
"##black secret### text"
|
|
|
|
<==> markdown Secret "#black secret##" <> " text"
|
|
|
|
"this is #secret#"
|
|
|
|
<==> "this is " <> markdown Secret "secret"
|
|
|
|
" #secret# text"
|
|
|
|
<==> " " <> markdown Secret "secret" <> " text"
|
|
|
|
" #secret# text"
|
|
|
|
<==> " " <> markdown Secret "secret" <> " text"
|
|
|
|
"this is #secret# "
|
|
|
|
<==> "this is " <> markdown Secret "secret" <> " "
|
|
|
|
"this is #secret# "
|
|
|
|
<==> "this is " <> markdown Secret "secret" <> " "
|
2021-05-09 10:53:18 +01:00
|
|
|
it "ignored as markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is # unformatted # text"
|
|
|
|
<==> "this is # unformatted # text"
|
|
|
|
"this is #unformatted # text"
|
|
|
|
<==> "this is #unformatted # text"
|
|
|
|
"this is # unformatted# text"
|
|
|
|
<==> "this is # unformatted# text"
|
|
|
|
"this is ## unformatted ## text"
|
|
|
|
<==> "this is ## unformatted ## text"
|
|
|
|
"this is#unformatted# text"
|
|
|
|
<==> "this is#unformatted# text"
|
|
|
|
"this is #unformatted text"
|
|
|
|
<==> "this is #unformatted text"
|
2025-02-03 08:55:46 +00:00
|
|
|
"*this* is #unformatted text"
|
|
|
|
<==> bold "this" <> " is #unformatted text"
|
2021-05-09 10:53:18 +01:00
|
|
|
it "ignored internal markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"snippet: `this is #secret_text#`"
|
|
|
|
<==> "snippet: " <> markdown Snippet "this is #secret_text#"
|
2021-05-09 10:53:18 +01:00
|
|
|
|
|
|
|
red :: Text -> Markdown
|
2022-02-22 14:05:45 +00:00
|
|
|
red = markdown (colored Red)
|
2021-05-09 10:53:18 +01:00
|
|
|
|
|
|
|
textColor :: Spec
|
|
|
|
textColor = describe "text color (red)" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is !1 red color! text"
|
|
|
|
<==> "this is " <> red "red color" <> " text"
|
|
|
|
"!1 red! text"
|
|
|
|
<==> red "red" <> " text"
|
|
|
|
"this is !1 red!"
|
|
|
|
<==> "this is " <> red "red"
|
|
|
|
" !1 red! text"
|
|
|
|
<==> " " <> red "red" <> " text"
|
|
|
|
" !1 red! text"
|
|
|
|
<==> " " <> red "red" <> " text"
|
|
|
|
"this is !1 red! "
|
|
|
|
<==> "this is " <> red "red" <> " "
|
|
|
|
"this is !1 red! "
|
|
|
|
<==> "this is " <> red "red" <> " "
|
2021-05-09 10:53:18 +01:00
|
|
|
it "ignored as markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is !1 unformatted ! text"
|
|
|
|
<==> "this is !1 unformatted ! text"
|
|
|
|
"this is !1 unformatted ! text"
|
|
|
|
<==> "this is !1 unformatted ! text"
|
|
|
|
"this is !1 unformatted! text"
|
|
|
|
<==> "this is !1 unformatted! text"
|
|
|
|
-- "this is !!1 unformatted!! text"
|
|
|
|
-- <==> "this is " <> "!!1" <> "unformatted!! text"
|
|
|
|
"this is!1 unformatted! text"
|
|
|
|
<==> "this is!1 unformatted! text"
|
|
|
|
"this is !1 unformatted text"
|
|
|
|
<==> "this is !1 unformatted text"
|
2025-02-03 08:55:46 +00:00
|
|
|
"*this* is !1 unformatted text"
|
|
|
|
<==> bold "this" <> " is !1 unformatted text"
|
2021-05-09 10:53:18 +01:00
|
|
|
it "ignored internal markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"this is !1 long *red* (not bold)! text"
|
|
|
|
<==> "this is " <> red "long *red* (not bold)" <> " text"
|
|
|
|
"snippet: `this is !1 red text!`"
|
|
|
|
<==> "snippet: " <> markdown Snippet "this is !1 red text!"
|
2022-02-22 18:18:35 +00:00
|
|
|
|
|
|
|
uri :: Text -> Markdown
|
|
|
|
uri = Markdown $ Just Uri
|
|
|
|
|
2023-10-16 19:23:38 +04:00
|
|
|
simplexLink :: SimplexLinkType -> Text -> NonEmpty Text -> Text -> Markdown
|
|
|
|
simplexLink linkType simplexUri smpHosts = Markdown $ Just SimplexLink {linkType, simplexUri, smpHosts}
|
2022-11-24 13:13:26 +00:00
|
|
|
|
2022-02-22 18:18:35 +00:00
|
|
|
textWithUri :: Spec
|
|
|
|
textWithUri = describe "text with Uri" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"https://simplex.chat" <==> uri "https://simplex.chat"
|
|
|
|
"https://simplex.chat." <==> uri "https://simplex.chat" <> "."
|
|
|
|
"https://simplex.chat, hello" <==> uri "https://simplex.chat" <> ", hello"
|
|
|
|
"http://simplex.chat" <==> uri "http://simplex.chat"
|
|
|
|
"this is https://simplex.chat" <==> "this is " <> uri "https://simplex.chat"
|
|
|
|
"https://simplex.chat site" <==> uri "https://simplex.chat" <> " site"
|
|
|
|
"SimpleX on GitHub: https://github.com/simplex-chat/" <==> "SimpleX on GitHub: " <> uri "https://github.com/simplex-chat/"
|
|
|
|
"SimpleX on GitHub: https://github.com/simplex-chat." <==> "SimpleX on GitHub: " <> uri "https://github.com/simplex-chat" <> "."
|
|
|
|
"https://github.com/simplex-chat/ - SimpleX on GitHub" <==> uri "https://github.com/simplex-chat/" <> " - SimpleX on GitHub"
|
|
|
|
-- "SimpleX on GitHub (https://github.com/simplex-chat/)" <==> "SimpleX on GitHub (" <> uri "https://github.com/simplex-chat/" <> ")"
|
|
|
|
"https://en.m.wikipedia.org/wiki/Servo_(software)" <==> uri "https://en.m.wikipedia.org/wiki/Servo_(software)"
|
2022-02-22 18:18:35 +00:00
|
|
|
it "ignored as markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"_https://simplex.chat" <==> "_https://simplex.chat"
|
|
|
|
"this is _https://simplex.chat" <==> "this is _https://simplex.chat"
|
2025-02-03 08:55:46 +00:00
|
|
|
"this is https://" <==> "this is https://"
|
2022-11-24 13:13:26 +00:00
|
|
|
it "SimpleX links" do
|
2024-02-17 16:29:45 +00:00
|
|
|
let inv = "/invitation#/?v=1&smp=smp%3A%2F%2F1234-w%3D%3D%40smp.simplex.im%3A5223%2F3456-w%3D%3D%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAjiswwI3O_NlS8Fk3HJUW870EY2bAwmttMBsvRB9eV3o%253D&e2e=v%3D2%26x3dh%3DMEIwBQYDK2VvAzkAmKuSYeQ_m0SixPDS8Wq8VBaTS1cW-Lp0n0h4Diu-kUpR-qXx4SDJ32YGEFoGFGSbGPry5Ychr6U%3D%2CMEIwBQYDK2VvAzkAmKuSYeQ_m0SixPDS8Wq8VBaTS1cW-Lp0n0h4Diu-kUpR-qXx4SDJ32YGEFoGFGSbGPry5Ychr6U%3D"
|
2025-01-30 10:06:26 +00:00
|
|
|
("https://simplex.chat" <> inv) <==> simplexLink XLInvitation ("simplex:" <> inv) ["smp.simplex.im"] ("https://simplex.chat" <> inv)
|
|
|
|
("simplex:" <> inv) <==> simplexLink XLInvitation ("simplex:" <> inv) ["smp.simplex.im"] ("simplex:" <> inv)
|
|
|
|
("https://example.com" <> inv) <==> simplexLink XLInvitation ("simplex:" <> inv) ["smp.simplex.im"] ("https://example.com" <> inv)
|
2024-02-17 16:29:45 +00:00
|
|
|
let ct = "/contact#/?v=2&smp=smp%3A%2F%2F1234-w%3D%3D%40smp.simplex.im%3A5223%2F3456-w%3D%3D%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAjiswwI3O_NlS8Fk3HJUW870EY2bAwmttMBsvRB9eV3o%253D"
|
2025-01-30 10:06:26 +00:00
|
|
|
("https://simplex.chat" <> ct) <==> simplexLink XLContact ("simplex:" <> ct) ["smp.simplex.im"] ("https://simplex.chat" <> ct)
|
|
|
|
("simplex:" <> ct) <==> simplexLink XLContact ("simplex:" <> ct) ["smp.simplex.im"] ("simplex:" <> ct)
|
2024-02-17 16:29:45 +00:00
|
|
|
let gr = "/contact#/?v=2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2FWHV0YU1sYlU7NqiEHkHDB6gxO1ofTync%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAWbebOqVYuBXaiqHcXYjEHCpYi6VzDlu6CVaijDTmsQU%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%22mL-7Divb94GGmGmRBef5Dg%3D%3D%22%7D"
|
2025-01-30 10:06:26 +00:00
|
|
|
("https://simplex.chat" <> gr) <==> simplexLink XLGroup ("simplex:" <> gr) ["smp4.simplex.im", "o5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion"] ("https://simplex.chat" <> gr)
|
|
|
|
("simplex:" <> gr) <==> simplexLink XLGroup ("simplex:" <> gr) ["smp4.simplex.im", "o5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion"] ("simplex:" <> gr)
|
2022-02-24 07:55:18 +00:00
|
|
|
|
|
|
|
email :: Text -> Markdown
|
|
|
|
email = Markdown $ Just Email
|
|
|
|
|
|
|
|
textWithEmail :: Spec
|
|
|
|
textWithEmail = describe "text with Email" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"chat@simplex.chat" <==> email "chat@simplex.chat"
|
|
|
|
"test chat@simplex.chat" <==> "test " <> email "chat@simplex.chat"
|
|
|
|
"test chat+123@simplex.chat" <==> "test " <> email "chat+123@simplex.chat"
|
|
|
|
"test chat.chat+123@simplex.chat" <==> "test " <> email "chat.chat+123@simplex.chat"
|
|
|
|
"chat@simplex.chat test" <==> email "chat@simplex.chat" <> " test"
|
|
|
|
"test1 chat@simplex.chat test2" <==> "test1 " <> email "chat@simplex.chat" <> " test2"
|
2022-02-24 07:55:18 +00:00
|
|
|
it "ignored as markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"chat @simplex.chat" <==> "chat " <> mention "simplex.chat" "@simplex.chat"
|
|
|
|
"this is chat @simplex.chat" <==> "this is chat " <> mention "simplex.chat" "@simplex.chat"
|
|
|
|
"this is chat@ simplex.chat" <==> "this is chat@ simplex.chat"
|
|
|
|
"this is chat @ simplex.chat" <==> "this is chat @ simplex.chat"
|
2025-02-03 08:55:46 +00:00
|
|
|
"*this* is chat @ simplex.chat" <==> bold "this" <> " is chat @ simplex.chat"
|
2022-02-24 07:55:18 +00:00
|
|
|
|
|
|
|
phone :: Text -> Markdown
|
|
|
|
phone = Markdown $ Just Phone
|
|
|
|
|
|
|
|
textWithPhone :: Spec
|
|
|
|
textWithPhone = describe "text with Phone" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"07777777777" <==> phone "07777777777"
|
|
|
|
"test 07777777777" <==> "test " <> phone "07777777777"
|
|
|
|
"07777777777 test" <==> phone "07777777777" <> " test"
|
|
|
|
"test1 07777777777 test2" <==> "test1 " <> phone "07777777777" <> " test2"
|
|
|
|
"test 07777 777 777 test" <==> "test " <> phone "07777 777 777" <> " test"
|
|
|
|
"test +447777777777 test" <==> "test " <> phone "+447777777777" <> " test"
|
|
|
|
"test +44 (0) 7777 777 777 test" <==> "test " <> phone "+44 (0) 7777 777 777" <> " test"
|
|
|
|
"test +44-7777-777-777 test" <==> "test " <> phone "+44-7777-777-777" <> " test"
|
|
|
|
"test +44 (0) 7777.777.777 https://simplex.chat test"
|
|
|
|
<==> "test " <> phone "+44 (0) 7777.777.777" <> " " <> uri "https://simplex.chat" <> " test"
|
2022-02-24 07:55:18 +00:00
|
|
|
it "ignored as markdown (too short)" $
|
2025-01-30 10:06:26 +00:00
|
|
|
"test 077777 test" <==> "test 077777 test"
|
2025-02-03 08:55:46 +00:00
|
|
|
it "ignored as markdown (double spaces)" $ do
|
2025-01-30 10:06:26 +00:00
|
|
|
"test 07777 777 777 test" <==> "test 07777 777 777 test"
|
2025-02-03 08:55:46 +00:00
|
|
|
"*test* 07777 777 777 test" <==> bold "test" <> " 07777 777 777 test"
|
2022-03-29 13:18:44 +01:00
|
|
|
|
2025-01-29 13:04:48 +00:00
|
|
|
mention :: Text -> Text -> Markdown
|
|
|
|
mention = Markdown . Just . Mention
|
|
|
|
|
|
|
|
textWithMentions :: Spec
|
|
|
|
textWithMentions = describe "text with mentions" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"@alice" <==> mention "alice" "@alice"
|
|
|
|
"hello @alice" <==> "hello " <> mention "alice" "@alice"
|
|
|
|
"hello @alice !" <==> "hello " <> mention "alice" "@alice" <> " !"
|
|
|
|
"@'alice jones'" <==> mention "alice jones" "@'alice jones'"
|
|
|
|
"hello @'alice jones'!" <==> "hello " <> mention "alice jones" "@'alice jones'" <> "!"
|
2025-01-29 13:04:48 +00:00
|
|
|
it "ignored as markdown" $ do
|
2025-01-30 10:06:26 +00:00
|
|
|
"hello @'alice jones!" <==> "hello @'alice jones!"
|
2025-02-03 08:55:46 +00:00
|
|
|
"hello @bob @'alice jones!" <==> "hello " <> mention "bob" "@bob" <> " @'alice jones!"
|
2025-01-30 10:06:26 +00:00
|
|
|
"hello @ alice!" <==> "hello @ alice!"
|
2025-02-03 08:55:46 +00:00
|
|
|
"hello @bob @ alice!" <==> "hello " <> mention "bob" "@bob" <> " @ alice!"
|
|
|
|
"hello @bob @" <==> "hello " <> mention "bob" "@bob" <> " @"
|
2025-01-29 13:04:48 +00:00
|
|
|
|
2022-03-29 13:18:44 +01:00
|
|
|
uri' :: Text -> FormattedText
|
|
|
|
uri' = FormattedText $ Just Uri
|
|
|
|
|
|
|
|
multilineMarkdownList :: Spec
|
|
|
|
multilineMarkdownList = describe "multiline markdown" do
|
|
|
|
it "correct markdown" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"http://simplex.chat\nhttp://app.simplex.chat" <<==>> [uri' "http://simplex.chat", "\n", uri' "http://app.simplex.chat"]
|
2023-08-02 16:22:20 +01:00
|
|
|
it "combines the same formats" do
|
2025-01-30 10:06:26 +00:00
|
|
|
"http://simplex.chat\ntext 1\ntext 2\nhttp://app.simplex.chat" <<==>> [uri' "http://simplex.chat", "\ntext 1\ntext 2\n", uri' "http://app.simplex.chat"]
|
2022-03-29 13:18:44 +01:00
|
|
|
it "no markdown" do
|
|
|
|
parseMaybeMarkdownList "not a\nmarkdown" `shouldBe` Nothing
|
2024-06-18 23:44:33 +04:00
|
|
|
let inv = "/invitation#/?v=1&smp=smp%3A%2F%2F1234-w%3D%3D%40smp.simplex.im%3A5223%2F3456-w%3D%3D%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAjiswwI3O_NlS8Fk3HJUW870EY2bAwmttMBsvRB9eV3o%253D&e2e=v%3D2%26x3dh%3DMEIwBQYDK2VvAzkAmKuSYeQ_m0SixPDS8Wq8VBaTS1cW-Lp0n0h4Diu-kUpR-qXx4SDJ32YGEFoGFGSbGPry5Ychr6U%3D%2CMEIwBQYDK2VvAzkAmKuSYeQ_m0SixPDS8Wq8VBaTS1cW-Lp0n0h4Diu-kUpR-qXx4SDJ32YGEFoGFGSbGPry5Ychr6U%3D"
|
|
|
|
it "multiline with simplex link" do
|
2025-01-30 10:06:26 +00:00
|
|
|
("https://simplex.chat" <> inv <> "\ntext")
|
|
|
|
<<==>>
|
2024-06-18 23:44:33 +04:00
|
|
|
[ FormattedText (Just $ SimplexLink XLInvitation ("simplex:" <> inv) ["smp.simplex.im"]) ("https://simplex.chat" <> inv),
|
|
|
|
"\ntext"
|
|
|
|
]
|