diff options
-rw-r--r-- | skate/cmd/skate-cleanup/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |