INNER CODE UNIT · Go
TestConvertString_WindowsCarriageReturn
JohannesKaufmann/html-to-markdown · convert_test.go:59
func TestConvertString_WindowsCarriageReturn(t *testing.T) {
testCases := []struct {
desc string
input string
expected string
}{
{
desc: "just newlines",
input: "\r\n\r\n\r\n\r\n",
expected: "",
},
{
desc: "inside strong",
input: "<strong>Bold\r\n\r\n\r\n\r\nText</strong>",
expected: "**Bold Text**",