package decoders

import (
	"strings"

	"git.max-richter.dev/max/marka/template"
)

func Keywords(input string, block template.Block) (value any, error error) {
	var tags []any
	split := strings.SplitSeq(input, "#")
	for tag := range split {
		tag = strings.TrimSpace(tag)
		if tag != "" {
			tags = append(tags, tag)
		}
	}

	if len(tags) == 0 {
		return nil, nil
	}

	return tags, nil
}
