package matrix import "testing" func TestMarkdownToHTML(t *testing.T) { tests := []struct { input string want string }{ {"**bold**", "bold"}, {"*italic*", "italic"}, {"~~strike~~", "strike"}, {"`code`", "code"}, {"line1\nline2", "line1
line2"}, {"**bold** and *italic*", "bold and italic"}, {"plain text", "plain text"}, {"", ""}, } for _, tt := range tests { got := MarkdownToHTML(tt.input) if got != tt.want { t.Errorf("MarkdownToHTML(%q) = %q, want %q", tt.input, got, tt.want) } } } func TestEscapeHTML(t *testing.T) { tests := []struct { input string want string }{ {"