From dc6b7a75ff5b7fcb8a0b0e3f7ed406422d847624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 19 May 2021 03:45:36 +0200 Subject: Revert "publisher: Make the HTML element collector more robust" This reverts commit ef0f1a726901d6c614040cfc2d7e8f9a2ca97816. --- common/text/transform.go | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'common') diff --git a/common/text/transform.go b/common/text/transform.go index 2d51f6c33..f59577803 100644 --- a/common/text/transform.go +++ b/common/text/transform.go @@ -45,25 +45,3 @@ func RemoveAccentsString(s string) string { accentTransformerPool.Put(t) return s } - -// Chunk splits s into strings of size. -func Chunk(s string, size int) []string { - if size >= len(s) { - return []string{s} - } - var chunks []string - chunk := make([]rune, size) - l := 0 - for _, r := range s { - chunk[l] = r - l++ - if l == size { - chunks = append(chunks, string(chunk)) - l = 0 - } - } - if l > 0 { - chunks = append(chunks, string(chunk[:l])) - } - return chunks -} -- cgit v1.2.3