From f976ef5c5d44c7af221fc4df08830f25ff545610 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 11 May 2021 22:35:27 +0200 Subject: skate-cleanup: append newline --- skate/cmd/skate-cleanup/main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'skate') diff --git a/skate/cmd/skate-cleanup/main.go b/skate/cmd/skate-cleanup/main.go index e1c7f3c..e81d4ee 100644 --- a/skate/cmd/skate-cleanup/main.go +++ b/skate/cmd/skate-cleanup/main.go @@ -68,6 +68,9 @@ func urlFilter(p []byte) ([]byte, error) { if url == "" && *skipNonMatches { return nil, nil } + if len(parts) == 1 || *index == len(parts) { + url = url + "\n" + } parts[*index-1] = url return []byte(strings.Join(parts, *delimiter)), nil } -- cgit v1.2.3