diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-02-05 18:31:11 +0100 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-02-05 18:31:11 +0100 |
commit | 2bee4a157068edcd9a159ee848bec46c061d34b1 (patch) | |
tree | 53541fca12ad103dbf6f0df7f7d246728fc871f4 /helpers/content_test.go | |
parent | 5df85770fca6184e4230e9cb4fddeb841087563f (diff) |
Replace 4 strings.Replace with 1 strings.Replacer
Consumes less memory, slightly faster.
Diffstat (limited to 'helpers/content_test.go')
-rw-r--r-- | helpers/content_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helpers/content_test.go b/helpers/content_test.go index 63ef82f2f..6191eb158 100644 --- a/helpers/content_test.go +++ b/helpers/content_test.go @@ -14,6 +14,8 @@ func TestStripHTML(t *testing.T) { {"<h1>strip h1 tag <h1>", "strip h1 tag "}, {"<p> strip p tag </p>", " strip p tag \n"}, {"</br> strip br<br>", " strip br\n"}, + {"</br> strip br2<br />", " strip br2\n"}, + {"This <strong>is</strong> a\nnewline", "This is a newline"}, } for i, d := range data { output := StripHTML(d.input) |