Do not render truncated links in markdown (#32980) (#32983)

Backport #32980 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot 2024-12-26 01:12:18 +08:00 committed by GitHub
parent ad1b76540e
commit a0b65ed17f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 40 additions and 17 deletions

View file

@ -45,3 +45,8 @@ func TestToSnakeCase(t *testing.T) {
assert.Equal(t, expected, ToSnakeCase(input))
}
}
func TestSplitTrimSpace(t *testing.T) {
assert.Equal(t, []string{"a", "b", "c"}, SplitTrimSpace("a\nb\nc", "\n"))
assert.Equal(t, []string{"a", "b"}, SplitTrimSpace("\r\na\n\r\nb\n\n", "\n"))
}