summaryrefslogtreecommitdiffstats
path: root/helpers/content_test.go
diff options
context:
space:
mode:
authorbep <bjorn.erik.pedersen@gmail.com>2015-02-05 18:31:11 +0100
committerbep <bjorn.erik.pedersen@gmail.com>2015-02-05 18:31:11 +0100
commit2bee4a157068edcd9a159ee848bec46c061d34b1 (patch)
tree53541fca12ad103dbf6f0df7f7d246728fc871f4 /helpers/content_test.go
parent5df85770fca6184e4230e9cb4fddeb841087563f (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.go2
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)