added strikethrough and monspace text styling options

see #382
This commit is contained in:
Bernhard B
2023-09-23 18:57:32 +02:00
parent 35e2e903df
commit 221e129ad4
2 changed files with 49 additions and 11 deletions

View File

@@ -38,3 +38,15 @@ func TestTwoBoldFormattedStrings(t *testing.T) {
expectMessageEqual(t, message, "This is a bold and another bold message")
expectFormatStringsEqual(t, signalCliFormatStrings, []string{"10:4:BOLD", "27:4:BOLD"})
}
func TestStrikethrough(t *testing.T) {
message, signalCliFormatStrings := ParseMarkdownMessage("This is a ~strikethrough~ and a **bold** message")
expectMessageEqual(t, message, "This is a strikethrough and a bold message")
expectFormatStringsEqual(t, signalCliFormatStrings, []string{"10:13:STRIKETHROUGH", "30:4:BOLD"})
}
func TestMonospace(t *testing.T) {
message, signalCliFormatStrings := ParseMarkdownMessage("This is a `monospace` and a **bold** message")
expectMessageEqual(t, message, "This is a monospace and a bold message")
expectFormatStringsEqual(t, signalCliFormatStrings, []string{"10:9:MONOSPACE", "26:4:BOLD"})
}