Replace regexp based Chomp with builtin TrimRight

This commit is contained in:
bep
2015-01-20 12:41:08 +01:00
parent 99aee30410
commit 077d726b51
2 changed files with 41 additions and 44 deletions

View File

@@ -835,9 +835,9 @@ func TestMarkdownify(t *testing.T) {
func TestChomp(t *testing.T) {
base := "\n This is\na story "
for i, item := range []string{
"\n",
"\r",
"\r\n",
"\n", "\n\n",
"\r", "\r\r",
"\r\n", "\r\n\r\n",
} {
chomped, _ := Chomp(base + item)