aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2016-08-08 00:12:06 +0200
committerBjørn Erik Pedersen <[email protected]>2016-09-06 18:32:18 +0300
commite56ecab1575f1b25552988b9efff2836f05f87f9 (patch)
tree630da0933c367ab1b334b232e48abecd6081e55f /helpers
parent0a7d1d0ddc213628fcde7c0e24991246836d9f16 (diff)
downloadhugo-e56ecab1575f1b25552988b9efff2836f05f87f9.tar.gz
hugo-e56ecab1575f1b25552988b9efff2836f05f87f9.zip
Multilingual TODO-fixes, take 1
See #2309
Diffstat (limited to 'helpers')
-rw-r--r--helpers/content.go18
-rw-r--r--helpers/content_test.go10
-rw-r--r--helpers/url.go1
3 files changed, 0 insertions, 29 deletions
diff --git a/helpers/content.go b/helpers/content.go
index 427d960a1..49d3469c5 100644
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -396,24 +396,6 @@ func WordCount(s string) map[string]int {
return m
}
-// RemoveSummaryDivider removes summary-divider <!--more--> from content.
-// TODO(bep) ml remove
-func RemoveSummaryDivider(content []byte) []byte {
- b := bytes.Replace(content, summaryDividerAndNewLines, []byte(""), 1)
- if len(b) != len(content) {
- return b
- }
- return bytes.Replace(content, SummaryDivider, []byte(""), 1)
-}
-
-func removeInternalSummaryDivider(content []byte) []byte {
- b := bytes.Replace(content, summaryDividerAndNewLines, []byte(""), 1)
- if len(b) != len(content) {
- return b
- }
- return bytes.Replace(content, SummaryDivider, []byte(""), 1)
-}
-
// TruncateWordsByRune truncates words by runes.
func TruncateWordsByRune(words []string, max int) (string, bool) {
count := 0
diff --git a/helpers/content_test.go b/helpers/content_test.go
index 85e0d7f4f..3a038ea12 100644
--- a/helpers/content_test.go
+++ b/helpers/content_test.go
@@ -409,13 +409,3 @@ func TestWordCount(t *testing.T) {
t.Errorf("Actual Map (%v) does not equal expected (%v)", actualMap, expectedMap)
}
}
-
-func TestRemoveSummaryDivider(t *testing.T) {
- content := []byte("This is before. <!--more-->This is after.")
- actualRemovedContent := RemoveSummaryDivider(content)
- expectedRemovedContent := []byte("This is before. This is after.")
-
- if !bytes.Equal(actualRemovedContent, expectedRemovedContent) {
- t.Errorf("Actual removed content (%s) did not equal expected removed content (%s)", actualRemovedContent, expectedRemovedContent)
- }
-}
diff --git a/helpers/url.go b/helpers/url.go
index f9a41dde3..83273324d 100644
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -186,7 +186,6 @@ func getLanguagePrefix() string {
}
// IsAbsURL determines whether the given path points to an absolute URL.
-// TODO(bep) ml tests
func IsAbsURL(path string) bool {
url, err := url.Parse(path)
if err != nil {