This commit is contained in:
Max Richter
2025-09-25 16:41:26 +02:00
parent 3f0d25f935
commit b13d5015f4
75 changed files with 3881 additions and 141 deletions

View File

@@ -19,8 +19,7 @@ func parseShortTemplate(input string) (Block, error) {
}
if len(split) > 1 {
optionSplit := strings.SplitSeq(split[1], ",")
for option := range optionSplit {
for option := range strings.SplitSeq(split[1], ",") {
switch strings.TrimSpace(option) {
case "number":
block.Codec = CodecNumber
@@ -28,6 +27,8 @@ func parseShortTemplate(input string) (Block, error) {
block.Codec = CodecText
case "hashtags":
block.Codec = CodecHashtags
case "optional":
block.Optional = true
default:
return block, fmt.Errorf("unknown codec option: %s", option)
}